30 maart 2023 Boolean Operators in Qlik Sense Deel dit bericht Every Friday at Bitmetric we’re posting a new Qlik certification practice question to our LinkedIn company page. Last Friday we asked the following Qlik Data Architect certification practice question about booleans operators (AND, OR, NOT, XOR) in Qlik Sense. The answers were more or less evenly distributed between B and C. The correct answer is B Statement 1 evaluates to True, while statement 2 evaluates to False. To see how we arrived at this answer, let’s first learn more about how Boolean operators are evaluated in Qlik (and in general). How does Qlik evaluate Boolean operators? Behind the Boolean operators is Boolean mathematics. The order of the Boolean algebra is the highest to lowest priority. This is: NOT AND OR Expressions inside brackets are always evaluated first. In Boolean algebra False() evaluates to 0, and True() evaluates to 1. We can also interpret AND as multiplication (*) and OR as addition (+). Using this information, we can evaluate the first expression False() OR NOT False() AND True() as: 0 OR NOT 0 AND 1 NOT is evaluated first, so we can rewrite the expression as: 0 OR 1 AND 1 Substituting AND for multiplication and OR for addition, we can finally rewrite the expression as: 0 + 1 * 1 Applying the PEMDAS order of operations, we can calculate the result as 1, true. (Note that in Qlik True() evaluates to -1 instead of 1, but the outcome is the same) The XOR Boolean operator The XOR, or exclusive or, operator is a shorthand for: (A OR B) AND NOT (A AND B) Or, to phrase it differently, XOR evaluates to true is either option is true, but not when both options are true. When we look at the second statement: True() XOR True() We can see that this doesn’t match the requirements of the XOR operator, so it evaluates to false. Using parentheses for readability The Boolean operators can be used at different places in Qlik Sense. They are used in if statements, for example to make flags in tables. They are used in WHERE statements to filter specific data, and many other options. In order to improve the readability of the Boolean operators, it’s a good idea to use parentheses. The expression below has the same result as the first statement from the question, but it is a lot easier to read: False()OR( NOT False() AND True()) Override the order of operations with parentheses We can also override the order of operations with parentheses. For example, if we want the OR operator to be evaluated before the AND operator, we can rewrite the expression as: (False() OR NOT False())ANDTrue() Should you always use parentheses? That depends, but typically it’s a good idea to use parentheses to aid readibility and understanding. You can learn more about this in our Qlik Coding Conventions. That’s it for this week, see you next Friday! More from the Bitmetric team Bitmetric Qlik Support Keep your Qlik environment running smoothly with proactive support that prevents issues before they appear. Available on flexible monthly plans. Learn more. Qlik vs Power BI Series See how Qlik and Power BI perform when theory meets reality. Three apps rebuilt, every step examined. Learn more. Qlik examentraining Oplossing Hoe kunnen we je ondersteunen? Barry beschikt over meer dan 20 jaar ervaring als architect, developer, trainer en auteur op het gebied van Data & Analytics. Hij is bereid om je te helpen met al je vragen. Bel ons Mail ons 23 november 2026 Beveiligingsupdates voor Qlik-producten: Brotli-kwetsbaarheid (CVE-2026-111497) Qlik heeft beveiligingsupdates uitgebracht voor verschillende producten vanwege een kwetsbaarheid in de Brotli-compressiebibliotheek (CVE-2026-111497). Lees welke versies zijn bijgewerkt en waarom ook Qlik Cloud-gebruikers hun Data Gateway moeten controleren. Beveiliging Kwetsbaarheid Qlik QlikView 20 november 2026 Gewoon de prijzen verhogen? Reken eerst je opties door Prijzen verhogen op je vakantiepark zonder gasten te verliezen? Ontdek waar het kantelpunt ligt, hoe verschillende gastgroepen reageren en welke prijsstrategie het meeste oplevert. Inclusief interactief dashboard om zelf scenario’s door te rekenen. Data-analyse Power BI Recreatiebranche 16 november 2026 Nog steeds op QlikView in 2026? QlikView werkt nog prima, dus waarom zou je veranderen? Barry Harmsen werkt er al bijna twintig jaar mee en snapt goed waarom organisaties blijven. Hij bespreekt zes situaties die hij in de praktijk tegenkomt, van “het werkt toch” tot QlikView als integratieplatform. Begrijpelijke redenen, maar zijn het in 2026 ook nog goede redenen? Gids Migratie Qlik QlikView
23 november 2026 Beveiligingsupdates voor Qlik-producten: Brotli-kwetsbaarheid (CVE-2026-111497) Qlik heeft beveiligingsupdates uitgebracht voor verschillende producten vanwege een kwetsbaarheid in de Brotli-compressiebibliotheek (CVE-2026-111497). Lees welke versies zijn bijgewerkt en waarom ook Qlik Cloud-gebruikers hun Data Gateway moeten controleren. Beveiliging Kwetsbaarheid Qlik QlikView
20 november 2026 Gewoon de prijzen verhogen? Reken eerst je opties door Prijzen verhogen op je vakantiepark zonder gasten te verliezen? Ontdek waar het kantelpunt ligt, hoe verschillende gastgroepen reageren en welke prijsstrategie het meeste oplevert. Inclusief interactief dashboard om zelf scenario’s door te rekenen. Data-analyse Power BI Recreatiebranche
16 november 2026 Nog steeds op QlikView in 2026? QlikView werkt nog prima, dus waarom zou je veranderen? Barry Harmsen werkt er al bijna twintig jaar mee en snapt goed waarom organisaties blijven. Hij bespreekt zes situaties die hij in de praktijk tegenkomt, van “het werkt toch” tot QlikView als integratieplatform. Begrijpelijke redenen, maar zijn het in 2026 ook nog goede redenen? Gids Migratie Qlik QlikView