Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart/Graph Dimension Sort/Order on x Axis

HI All (my first post on QView community forum)

I am having problems with the sorting of the dimensions on the x axis of a chart.

This is the code for a dimension i have which groups a field i have.

  Code.bmp

The graph appears like this. With the ages completely out of order.

Graph.bmp

14 Replies
SunilChauhan
Champion II
Champion II

see the attached file

hopee ths helps

Sunil Chauhan
Not applicable
Author

Apologies   

i have ages 16 - 95. Would i need to create a Load inline for every age?

I also have around 50 other data items. would i need to create a preceeding load to bring in these additional items ??

Thanks for your help

James

SunilChauhan
Champion II
Champion II

no need to load inline .

you have expression apply in sort expression.

hopee this helps

Sunil Chauhan
Not applicable
Author

HI

This was suggested to me. But it didnt work. Any Ideas ?

=wildmatch(if(Driver_1_Age<=18,'<18',

if(Driver_1_Age<23,'19-23',

if(Driver_1_Age<28,'24-28',

if(Driver_1_Age<33,'29-33',

if(Driver_1_Age<39,'34-39',

if(Driver_1_Age<45,'40-45',

if(Driver_1_Age<50,'46-50',

if(Driver_1_Age<55,'51-55',

if(Driver_1_Age<60,'56-60',

if(Driver_1_Age<65,'61-65',

if(Driver_1_Age<70,'66-70',

if(Driver_1_Age<=74,'71-74',
'75+')))))))))))),'<18','19-23','24-28','29-33','34-39','40-45','46-50','51-55','56-60','61-65','66-70','71-74','75+')

mikecrengland
Creator III
Creator III

You could use a 'dual' function in your calcualted dimension

=If (Driver_1_Age<=18, dual('<18',1),

     If (Driver_1_Age<23, dual('<23',2),

etc...

Then sort numerically.