Skip to main content
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: 
Not applicable

Grouping Calculated Dimensions

Hi. I have a calculated dimension called Average Spend. I have calculated the average spend per customer using the aggr function. The measure on the Y axis is No Of Customers. What I want to do is to group the Average Spend so that the first bar is 0-200, the second 201-400, the third 401-600 etc. I cannot see a way of doing this. Can anyone help

2 Replies
Not applicable
Author

You may just try as below:

if(aggr(sum(average_spend),Customer)<=200,'0-200',

          if(aggr(sum(average_spend),Customer)<=400,'201-400',

          if(aggr(sum(average_spend),Customer)<=600',401-600','>600')

)

)

Only problem is that this is practical only if number of groups is less number. If you want one such grouping propably you can do this at script level. But generally the groups will be a fixed number

Regards,

Kiran.

Not applicable
Author

Many thanks Kiran - this worked.