Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sort Order of Month-Day Dimension

I have a bar chart that is comparing total amount based on month/day, which is a created the field created by MONTH(DateField) & "-" & DAY(DateField). I am having issues with the dates showing in the correct order on the axis. I was able to put the months in order by doing a match statement. What is the best way to go about putting the months/days in order? Is there a different way to create the month/day field that will automatically put them in order? 

5 Replies
sunny_talwar

May be create this field like this:

Dual(Month(DateField) & "-" & Day(DateField), DateField)

MarcoWedel

maybe also possible to create dual values (instead of your text only values):

Date(DateField,'MMM-DD') as [Month-Day]

or if you want to unify the year in order to compare your Month-Days between different years:

Date(SetDateYear(DateField,2000),'MMM-DD') as [Month-Day]

hope this helps

regards

Marco

maxgro
MVP
MVP

I think you can sort by expression in the sort tab of the chart

max(DateField)

1.png

kkkumar82
Specialist III
Specialist III

Better create a autonumber on that field in the edit script like YearDateNum and use this in the chart -> sort->expression->YearDateNum;

Hope I am clear

kkkumar82
Specialist III
Specialist III

PFA file