Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
cgarcia23e
Contributor II
Contributor II

Set Analysis Clarification

Hello,

I discovered some discrepancies in some of my fields and while doing research on the forums, I came across something even more peculiar. Can someone please help me understand the difference between these measures AND how the {} syntax actually affects set analysis? Thanks in advance! 

 

Sum({<FoundationsFlag = {'No'}, OnboardingFlag = {'0-3 Months Onboarding'}>}AttributedGP)
+
Sum({<FoundationsFlag = {'No'}, OnboardingFlag = {'4-6 Months Onboarding'}>}AttributedGP)

 

vs

 

Sum({<FoundationsFlag = {'No'}, OnboardingFlag = {'0-3 Months Onboarding'}>
+
<FoundationsFlag = {'No'}, OnboardingFlag = {'4-6 Months Onboarding'}>}AttributedGP)


which I find the measure outcome to be similar to: 

Sum({<FoundationsFlag = {'No'}, OnboardingFlag = {'0-3 Months Onboarding', '4-6 Months Onboarding'}>} AttributedGP)

Labels (1)
1 Solution

Accepted Solutions
dplr-rn
Partner - Master III
Partner - Master III

in your particular case it may not make a difference but
wrt your 2nd set expression
Sum(<Set 1> + <Set 2> Measuer) the + is basically an or so its set 1 or set 2
so you can give conditions like


Sum({<FoundationsFlag = {'No'}, OnboardingFlag = {'0-3 Months Onboarding'}>
+
<FoundationsFlag = {'Yes'}, OnboardingFlag = {'4-6 Months Onboarding'}>}AttributedGP)

 

Hope its clearer

View solution in original post

4 Replies
dplr-rn
Partner - Master III
Partner - Master III

in your particular case it may not make a difference but
wrt your 2nd set expression
Sum(<Set 1> + <Set 2> Measuer) the + is basically an or so its set 1 or set 2
so you can give conditions like


Sum({<FoundationsFlag = {'No'}, OnboardingFlag = {'0-3 Months Onboarding'}>
+
<FoundationsFlag = {'Yes'}, OnboardingFlag = {'4-6 Months Onboarding'}>}AttributedGP)

 

Hope its clearer

cgarcia23e
Contributor II
Contributor II
Author

Thanks for clarifying that the + is basically an or. That helps, but I'm still not sure why I'm getting different outputs with the two measures below. I would expect both measures to provide the same output since I'm looking at the same group of folks but bucketing two date ranges into one? 

Perhaps I need to add a little more detail to my original inquiry: My FoundationsFlag field distinguishes between No, Yes (doesn't include SpecialGroup), and Yes-SpecialGroup. I need to differentiate between all three groups of individuals. My first measure is more what I anticipated to see since the output is just the sum of the individual date ranges for NonFoundations folks. I can't really tell what's happening with my second measure. 

Sum({<FoundationsFlag = {'No'}, OnboardingFlag = {'0-3 Months Onboarding'}>}AttributedGP)
+
Sum({<FoundationsFlag = {'No'}, OnboardingFlag = {'4-6 Months Onboarding'}>}AttributedGP)

Output: 3.7

vs

Sum({<FoundationsFlag = {'No'}, OnboardingFlag = {'0-3 Months Onboarding'}>
+
<FoundationsFlag = {'No'}, OnboardingFlag = {'4-6 Months Onboarding'}>}AttributedGP)

Output: 2.87

dplr-rn
Partner - Master III
Partner - Master III

Hard to diagnose what the issue is.  I would say something in the data

What is the output of Sum(AttributedGP) when you select the filters FoundationsFlag = No &  OnboardingFlag '0-3 Months Onboarding', '4-6 Months Onboarding'

In this case your expression 2 should return same result as this

Sum({<FoundationsFlag = {'No'}, OnboardingFlag = {'0-3 Months Onboarding', '4-6 Months Onboarding'}>} AttributedGP)

what is the output of that?

 

 

cgarcia23e
Contributor II
Contributor II
Author

You are right in both cases:  I get 2.87. Perhaps it is something in the data. I'll continue validating. Thanks so much for all of your help!