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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I Set Sort Order in chart with Calculated Dimension?

I have created a chart with calculated DImension

The chart shown below

The calculated Dimension is as follows

=Replace(class(POINTS,$(vClassVol)),'<= x <', ' - ')

band.JPG.jpg

How do I set the sort order so that the 50-100 after 0-100

Thank you

12 Replies
Not applicable
Author


Could you please explain why Dual function is used here and what exactly Dual function does??

MK_QSL
MVP
MVP

=DUAL(Replace(class(POINTS,$(vClassVol)),'<= x <', ' - '),class(POINTS,$(vClassVol)))


Dual Function is Storing Data as String and Number both format.

1st Part Replace(class(POINTS,$(vClassVol)),'<= x <', ' - ') as String

and 2nd Part class(POINTS,$(vClassVol)) as Number


Now when you sort by number it will consider the second part.


Why I use Dual ?

Class Function is storing data as Numeric Format but when you tried Replace, it will converted to text/string format.


If you try only class(POINTS,$(vClassVol)) in class format without replace, you can sort the data by the same sorting method I have described above, but due to replace function now it will not work.


Hope this will help..

Not applicable
Author

Thanks Manish. Nice of you giving detailed explanation. This makes understanding much better and easy. Appreciate