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: 
Not applicable

How to do calculated dimensional sort

I have a calculated dimension as said below

if(points>0, if((Last_bill_date-first_bill_date)<30,'<30',if((Last_bill_date-first_bill_date)<60,'30-60'))

I need to sort this like

<30

30-60 and on....

Can anybody please help me on the same.

Labels (1)
3 Replies
sunny_talwar
MVP
MVP

Update: Try sorting by Avg(Last_bill_date-first_bill_date)

Have you tried sorting it by Last_bill_date-first_bill_date?


Best,

S

sunny_talwar
MVP
MVP

The idea is the when you sort by the Avg(Last_bill_date-first_bill_date), it will be in the same order as the ranges itself: so average of <30 would also be below 30 and average of 30-60 would be between those two numbers.

Hope this is what you want to do.

Best,

S

manojkulkarni
Partner - Specialist II
Partner - Specialist II

Calculated dimension is not necessary, then you could put this logic in load script. Sorting can be handled easily. Another part of it is , calculated dimensions will consume more time than normal fields