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

Announcements
Save an extra $150 Dec 1–7 with code CYBERWEEK - stackable with early bird savings: 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

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Try below as calculated dimension

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


Now go to sort expression and use Number by Ascending or Descending Order

View solution in original post

12 Replies
Anonymous
Not applicable
Author

Can you upload a sample qvw???

Not applicable
Author

Go to the sort tab, and for calulated dimension click on

Numeric value--> Ascending option.

I t will automatically sort the calulated dimension as per the numenric values.

Hope this will help you...!!!

Not applicable
Author

Hi Priya Sane

Thanks I have tried. The result as follow. I am not getting the correct chart

Capture1.JPG.jpg

settings.JPG.jpg

Not applicable
Author

Could you try the same sort for Numeric value by removing the 'Replace' clause in your calculated dimension and check whether its working or not.

Not applicable
Author

I have tried. Qlikview says Error

The dimension as follows ==(class(POINTS,$(vClassVol)),'<= x <', ' - ')

error.JPG.jpg

Not applicable
Author

write

class(POINTS,$(vClassVol)) as calculated dimension and try

or the other option is write your same expression you have written in calculated dimension in your Sort tab--> Expression field.

Not applicable
Author

Hi,

Try:

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

in sorting Expression and select ascending.

i.e replace '<= x <' with 0 in sorting expression.

MK_QSL
MVP
MVP

Try below as calculated dimension

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


Now go to sort expression and use Number by Ascending or Descending Order

Not applicable
Author

Priya,

I have tried using the calculated dimension expression in sort expression. I am getting the same chart as what I posted in my first request

How ever if I use the expression class(POINTS,$(vClassVol)) It does solves but the x axis labeling is different

xaxis.JPG.jpg

Thanks. Manish suggestion worked the way I want. Your suggestion is alternate.