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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
ferha_jafri
Partner - Creator III
Partner - Creator III

Issue with sorting

Hello everyone,

I am attaching a documnet in which i want my x axis as 2011 ,2012 ,that then for 2013 i want jan feb mar... but i am not able to get this i am attaching the screenshot ,if anyone knows about it please let me kmow.

Thanks in advance

Ferha Jafri

1 Solution

Accepted Solutions
Not applicable

Hi,

Use this Expression in Sort ( Properties)

 

=

WildMatch(MonthYear2013,'2011','2012','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec') 

or

 

=

WildMatch(MonthYear2013,Year(MonthYear2013),'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')

& Mark as Ascending order......

View solution in original post

8 Replies
Not applicable

What dimension are you using there? Is that dimension always numeric.

You should use a numeric dimension. You could also create a dimension with dual values:

Dual(String to be shown, numeric value).

Or you could also use an expression to sort the dimension in the graph, the one you have in te sorting tab of the graph.

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

I am attaching the documnet please check..

Not applicable

Hi ferha_jafri,

I can´t see the document

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

just now i attached the documnet did get it?

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

Hello Losu,

Now you can see it..

Not applicable

As I see, the problem is in the MonthYear2013 field creation:

if([Credit Date Year]='2011',[Credit Date Year],if([Credit Date Year]='2012',[Credit Date Year],if([Credit Date Year]='2013',[Credit Date Month]))) as MonthYear2013

You should creazte a dual field, that way you'll be able to sort it correctly and show it in the graph the way you want. It should be something like:

if([Credit Date Year]='2011', Dual([Credit Date Year], [Credit Date Year]&00),if([Credit Date Year]='2012', Dual([Credit Date Year], [Credit Date Year]&00),if([Credit Date Year]='2013',Dual([Credit Date Month], num(2013 & num([Credit Date Month])))))) as MonthYear2013

What you do here is create a dual field. The dual field has two values, one string that is the one that appears in the grapsh, and one numeric that is the one QV uses for sorting.

Good luck

ferha_jafri
Partner - Creator III
Partner - Creator III
Author

My hardluck still can't get what clien is asking for...

Not applicable

Hi,

Use this Expression in Sort ( Properties)

 

=

WildMatch(MonthYear2013,'2011','2012','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec') 

or

 

=

WildMatch(MonthYear2013,Year(MonthYear2013),'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec')

& Mark as Ascending order......