7 February 2022 Qlik Set Identifiers Share this message 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 Business Analyst certification practice question about Set Analysis and Qlik Set Identifiers: There was a little catch to this question, which fooled exactly no one 😉 The correct answer is C: 65% Even though the Business Analyst selected the year 2022, that selection is ignored because the expression uses the 1 Set Identifier in the Set Analysis statement (or Set Expression). In fact, when using 1 as your Set Identifier, all selections are ignored. This means the expression is calculated for the entire data set. In our question, the result is that we have to take not only Feb 2022 into account, but also Feb 2021. From the table we can get the values for Sales (250 + 250 = 500) and Cost of Goods Sold (50 + 125 = 175). Plugging these values into the expression gets us (500 – 175) / 500 = 0.65, or 65%. Qlik Set Identifiers As mentioned above, the 1 used in the Set Expression is called a Set Identifier. You can think of the Set Identifier as the ‘starting point’ for the data that is included in your Set Expression. This data set can be further modified using a Set Modifier. For example using the <[Month]={‘Feb’}> modifier from the question. This sets the selection in the Month field to Feb. We’ll cover Set Modifiers another time though. Common Set Identifiers Besides 1, there are a few other common Set Identifiers: $ refers to the current user selection in the default state (i.e. not an Alternate State). If you don’t specify a Set Identifier, Qlik assumes $ by default. There’s a catch though, more on that later. $1 refers to the previous user selection in the default state, as if you pressed the Back button. $2 refers to 2 selections ago, $3 refers to 3 selections ago, etc. $_1 refers to the next user selection in the default state, as if you pressed the Forward button. $_2 refers to 2 selections forward, $3 refers to 3 selections forward, and so on. This identifier, and the previous one, typically see very little use in our projects as we find that users typically don’t want to compare current to previous selections. Rather, they want to make comparisons between multiple independent selections, which we’ll cover another time. Bookmark, you can use either the Title or the ID of a bookmark to refer to the selection stored inside it. Alternate State, you can use the Name of an Alternate State to refer to the selection within the state. Fun aside, Qlik will (sensibly) not let you create an Alternate State named $, but will let you create states named 1, $1 or with the same name as a bookmark title. This can lead to strange behavior as the clip below shows. When creating an Alternate State named 1, Qlik still interprets the 1 identifier as referencing the entire data set. However, when creating states named $1 or My Bookmark (which has the same name as a bookmark in the app) these identifiers now reference the Alternate States $1 and My Bookmark, and not the previous selection or the selection stored in the bookmark. Best to not mix up Set Identifiers and Alternate State names 😉 Leaving out $ assumes the current user selection As mentioned above, when you don’t specify a Set Identifier, Qlik assumes the current user selections. Many developers take this to mean that $ and no identifier are identical. Seeing an opportunity for laziness… er, efficiency, some may opt to just leave out $ when they want to refer to the current user selections. The catch is when you leave out the Set Identifier, Qlik assumes the current user selections for the inherited state. When placing an expression without a Set Identifier in an object that is in an Alternate State, Qlik will use the current user selections in that state, rather than the default state. The clip below illustrates this. Is this a bad thing, to be avoided at all cost? No, definitely not, but it’s good to be aware of the difference. Leaving out a Set Identifier can even be very convenient if you want to use a Master Measure containing Set Analysis across objects that are in different Alternate States. That’s it for this question! See you next Friday? Take your Qlik skills to the next level! If you enjoy Qlik, you’ll love the Masters Summit for Qlik. 3 days of Qlik deep dives, peer networking, ready to use resources and much more! See you there! Test your Qlik knowledge! Check out the Friday Qlik Test Prep archive for more Qlik questions and answers. Friday Qlik Test Prep Set Analysis Solution How can we help? Feel free to contact us if you have any comments or questions. Call us Mail us 21 September 2023 Qlik Sense Enterprise for Windows – Critical Security Fix #2 A new security issue in Qlik Sense Enterprise for Windows has been identified. This resolves an incomplete fix for the vulnerability that was reported earlier this month. Patches are available and it is recommended to update your Qlik Sense Enterprise for Windows environment at the earliest possibility. New Release Qlik Security 6 September 2023 Battle Ships & Big Data: join us for some fun! Unleash the Power of Data in the Ultimate Battle Ship Game! Join us at the Big Data Expo for a thrilling experience that blends strategy, competition, and analytics. Discover how data influences gameplay and be part of our research! Plus, dive into the world of data and analytics with the experts from Bitmetric. Don’t miss out! See you at booth 46! Bitmetric Event Qlik Team 29 August 2023 Qlik Sense Enterprise for Windows – Critical Security Fixes Two security issues in Qlik Sense Enterprise for Windows have been identified and patches made available. Details can be found in Security Bulletin Critical Security fixes for Qlik Sense Enterprise for Windows (CVE-2023-41266, CVE-2023-41265). New Release Qlik Security
21 September 2023 Qlik Sense Enterprise for Windows – Critical Security Fix #2 A new security issue in Qlik Sense Enterprise for Windows has been identified. This resolves an incomplete fix for the vulnerability that was reported earlier this month. Patches are available and it is recommended to update your Qlik Sense Enterprise for Windows environment at the earliest possibility. New Release Qlik Security
6 September 2023 Battle Ships & Big Data: join us for some fun! Unleash the Power of Data in the Ultimate Battle Ship Game! Join us at the Big Data Expo for a thrilling experience that blends strategy, competition, and analytics. Discover how data influences gameplay and be part of our research! Plus, dive into the world of data and analytics with the experts from Bitmetric. Don’t miss out! See you at booth 46! Bitmetric Event Qlik Team
29 August 2023 Qlik Sense Enterprise for Windows – Critical Security Fixes Two security issues in Qlik Sense Enterprise for Windows have been identified and patches made available. Details can be found in Security Bulletin Critical Security fixes for Qlik Sense Enterprise for Windows (CVE-2023-41266, CVE-2023-41265). New Release Qlik Security