Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
youss123
Contributor III
Contributor III

bar chart expression

Hi all,

I created an expression to calculate a score for users based on their responses to a questionnaire. 


floor(100-((avg({ <[TASK NAME]= {'Questionnaire 2Year'}, [TASK - Statut]= {'*Done*'}  >}[RESPONSE - Value])/4)*100))
-
floor(100-((avg({ <[TASK NAME= {'Questionnaire 1Year'}, [TASK - Statut]= {'*Done*'}  >}[RESPONSE - Value])/4)*100))

Now, I'm looking to group the users into specific score ranges, such as 0-10, 10-20, and so on, up to 90-100.

My goal is to count how many patients fall into each of these score ranges.

Can anyone help me with the QlikView expression and dimensions I should use to accomplish this task effectively

 

Thank you for your help

4 Replies
justISO
Specialist
Specialist

Hi, not sure how it is different in QlikView, but in QlikSense this can be achieved with function class().  You can try something like this:

class(your_measure_expresion_you_wrote_above  , 10)

But you'll get something like this '20<=x<30', so to look nicer, you can replace '<=x<' to '-', with something like this:

replace( class(your_measure_expresion_you_wrote_above  , 10) , '<=x<',  '-')

youss123
Contributor III
Contributor III
Author

Hi , 

Thank you for your help,

I have to make this in dimention and count(users) in the expression ?

justISO
Specialist
Specialist

I believe yes, as in this way you'll see count(users) per each score 'bucket'.

youss123
Contributor III
Contributor III
Author

Not working but thank you anyway @justISO