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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting y axis in graph

I have ranges as shown in the attachment.Range.JPG

I want to sort it in y axis as :-

More than 1000k

500 to 1000k

200k to 500k

100k to 200k

Less than 100k

0

Note :- Without any hard coding.

1 Solution

Accepted Solutions
sunny_talwar

I suggest using Dual function in your script to create numeric values for your fields. For the sample provided, this script should work fine:

Table:

LOAD Field,

  Dual(Field, Alt((Num#(KeepChar(SubField(Field, ' ', 1), '0123456789'), '##') + Num#(KeepChar(SubField(Field, ' ', -1), '0123456789'), '##'))/2,

  KeepChar(Field, '0123456789'))) as NewField;

LOAD * Inline [

Field

More than 1000k

500 to 1000k

200k to 500k

100k to 200k

Less than 100k

];

Where NewField looks like your ranges, but they also have associated value with them which can then be sorted in ascending or descending values

Capture.PNG

View solution in original post

16 Replies
Not applicable
Author

Hi,

Go for Sort tab and give the expression sorting in descending order.

Not applicable
Author

Hi,

Can u share your qvw.

manojkulkarni
Partner - Specialist II
Partner - Specialist II

How did you derived Ranges ? If it by expression, then use the same expression in Sorting as well.

Possible share the application

Not applicable
Author

Nope it didnt worked

I am not permitted to share the qvw, Sorryyy

sunny_talwar

May be use a dual function to create your ranges. What expression are you using for your dimension right now?

Not applicable
Author

Can you create a sample qvw with some sample data.

Not applicable
Author

Its a field X from DB and I'm directly fetching that field.

I am not creating any ranges in qlikview.

sunny_talwar

What function are you using for creating the ranges in the script? or are these coming directly from your datasource?

Not applicable
Author

Its a field from DB, say X field.

ranges are its values, I am not creating any ranges in qlikview.