New to Qlik Analytics

If you’re new to Qlik Cloud or Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG

Who Me Too'd this topic

HerveMichel
Contributor
Contributor

Outer SetAnalysis modifier ignored

Hi, I have a question concerning the way Outer SetAnalysis modifiers are working. 

In my below example, I use an application that contains data for Years 2022 and 2023. There is no data for 2021. 

I have a standard calculation that counts the number of Customers that is:

count(distinct Customer_ID) = 1500 

If I use SetAnalysis on the field Year only, it will work as expected, using an inner Set Analysis or an outer Set Analysis:

  • Inner: count({<Year={2022}>}distinct Customer_ID) = 1000
  • Outer: {<Year={2022}>}count(distinct Customer_ID) = 1000

If I do the same but put 2021 instead of 2022, since I don't have data for 2021, the expected result should be 0, which is the case, for both Inner and Outer Set Analysis.

However, as soon as I introduce another set modifier in my inner set analysis, and I put year 2021 in my Outer Set Analysis, the behaviour gets weird:

  • Only Customer_Segment: count({<Customer_Segment={'Employer'}>}distinct Customer_ID) = 750 - OK
  • All Inner: count({<Year={2021},Customer_Segment={'Employer'}>}distinct Customer_ID) = 0 - OK
  • All Outer: {<Year={2021},Customer_Segment={'Employer'}>}count(distinct Customer_ID) = 0 - OK
  • Year in Outer, CustSeg in Inner: {<Year={2021}>}count({<Customer_Segment={'Employer'}>}distinct Customer_ID) = 750 - NotOK. 750 is the total number of customers for the Customer_Segment 'Employer'

It seems like, when there is an inner set analysis, and we apply an outer set analysis with a modifier that is not in the data set (Year = 2021 in this example), this outer set analysis modifier is simply ignored, instead of resulting in 0. 

After doing some more tests, if we have 2 modifiers in Outer SA (1 out of dataset, 1 within data set), and 1 or more modifiers in Inner SA, the modifiers from Outer SA that is out of dataset will be ignored (like above), but the second modifier will still be considered.

Is this the expected behaviour for Outer set analysis? Should it be the exact same result as when we use same modifier in Inner Set analysis? 

I confirm that I don't use and Set Identifier ($, 1, ...)

Thank you in advance for your help

 

Labels (1)
Who Me Too'd this topic