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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
NewToQlik
Creator
Creator

How to combine 2 set analysis

Hi all,

Currently, I am using this measure below. Is it possible to combine all of this? I tried using sum() but it did not work.

count(distinct {<[Current score]={"< $(APlusSlider)"},[Current_Grade]= {'A+'}>}[Student_name])


+ count(distinct {<[Current score] = {">= $(ASlider)"},[Current_Grade]= {'B+'}>}[Student_name])


+ count(distinct {<[Current score] = {">= $(ASlider)"},[Current_Grade]= {'B'}>}[Student_name])



Much help is appreciated.


Thank you.



1 Solution

Accepted Solutions
mikaelsc
Specialist
Specialist

read (and keep this close) this :Set Analysis: syntaxes, examples

so something like:

count(distinct

{<[Current score]={"<$(APlusSlider)"},[Current_Grade]= {'A+'}>

+<[Current score] = {">=$(ASlider)"},[Current_Grade]= {'B+'}>

+ <[Current score] = {">=$(ASlider)"},[Current_Grade]= {'B'}>}[Student_name])


(+ remove spaces in your current score modifiers)

View solution in original post

5 Replies
agigliotti
MVP
MVP

what does the content of "ASlider" and "APlusSlider" variables is ?

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
NewToQlik
Creator
Creator
Author

The variables are the minimum score for each grade, eg 'A+', 'A', and so on.

NewToQlik
Creator
Creator
Author

Currently the measure on top works, but I would like to have it as a shorter expression, since there are many grades in my data.

mikaelsc
Specialist
Specialist

read (and keep this close) this :Set Analysis: syntaxes, examples

so something like:

count(distinct

{<[Current score]={"<$(APlusSlider)"},[Current_Grade]= {'A+'}>

+<[Current score] = {">=$(ASlider)"},[Current_Grade]= {'B+'}>

+ <[Current score] = {">=$(ASlider)"},[Current_Grade]= {'B'}>}[Student_name])


(+ remove spaces in your current score modifiers)

NewToQlik
Creator
Creator
Author

Thank you very much! It works now