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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Formula use in set analysis

Hi Guys,

I have a set analysis sample here





=Count({$< vAverageScore = {">= 0 <= 25"}>} Distinct Student)

Where: vAverage is an Expression ; vAverage = avg(StudentScore)

This set analysis should count the number of student with an average is from 0 to 25.

Is this possible? Coz in my workfile the result is just the distinct count of Student. (the expression ignores the " vAverageScore = {">= 0 <= 25"" part)

Thanks



3 Replies
Not applicable
Author

I´m not sure.....but you can not use expression(vAverageScore) to compare in your set!!!!!!

You must use just Dimensions!!!!!

tabletuner
Creator III
Creator III

Hi,

is this syntax helpful:

=Count({$< vAverageScore ={$(='">=' & 0 &'<=' & 25 &'"' )} Distinct Student)

Regards,

Tjeerd

johnw
Champion III
Champion III

As Érico says, you can't do set analysis using a variable or expression like that. You can only use set analysis on fields. So the trick is figuring out how to do this using fields. And the trick to that is realizing that you can use advanced search features. Untested, but I think it would look something like this:

count({<Student={"=avg(StudentScore)>=0 and avg(StudentScore)<=25"}>} Student)