Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
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
Partner - Champion
Partner - Champion

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

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