Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sorting chart month formula

Hi,

In this chart, dimension=Month (fieldname=Monthname) and measure=Quantity.

Under sorting what would be the expression (formula)? Tried several formulas, cant seem to manage..

Thanks

Qliksmonth.JPG

10 Replies
sushil353
Master II
Master II

hi,

create a another field in your data model that have number of corresponding month and then in the expression use =MonthNo

uncheck other sorting option..

sushil353
Master II
Master II

you can also try this expression:

=num(date(MonthName,'MMMM'))

shraddha_g
Partner - Master III
Partner - Master III

if you have MonthStart field then you can use MonthStart field in Sort by Expression

Not applicable
Author

Shraddha, thanks for helping

does not work...difficult to figure out why

shraddha_g
Partner - Master III
Partner - Master III

try:

in Sort by expression

num(month(Datefield))

Not applicable
Author

seems to work!

shraddha_g
Partner - Master III
Partner - Master III

Also workaround:

Pick(wildmatch(Monthname,'January','February','March','April','May','June','July','August','September','October','November','December'),

1,2,3,4,5,6,7,8,9,10,11,12)

Not applicable
Author

that works excellent everywhere. many thanks

Not applicable
Author

Hi try this in  script

if(Month(DateField)=9,6,if(Month(DateField)=10,7,if(Month(DateField)=11,8,if(Month(DateField)=12,9))))))))))))as SalesMonthOrder,

And go to chart propertires sort --> expression--> use SalesMonthOrder field in that.

sure it will work