Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ts3st1000
Contributor
Contributor

Sorting X Axis variable

Hello, I need to sort the x axis on a chart where the variable takes one of these 5 values:

Alpha, Beta, Gamma, Not Applicable, or None. And i tried the following in "Sorting by Expression" field:

if(Variable='Alpha',1,if(Variable='Beta',2,if(Variable='Gamma',3,if(Variable='Not Applicable',4,5))))

but this has not given me the expected result. Any suggestions how to fix this please.

Thanks and regards,

Ra

13 Replies
ts3st1000
Contributor
Contributor
Author

Thank you very much Thirumala, that worked.

trdandamudi
Master II
Master II

You are welcome and glad able to help.

MarcoWedel

Hi,

if this expression works, then

Match(Variable,'Alpha','Beta','Gamma','Not Applicable','None')


should deliver the same result, as the Match() function itself already returns those numbers.


hope this helps


regards


Marco

neha_shirsath
Specialist
Specialist

Yes, what i was explaining for Inline was exactly given in qvw by trdandamudi