Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
Honored Contributor II

Re: Sorting chart month formula

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
Honored Contributor II

Re: Sorting chart month formula

you can also try this expression:

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

shraddha_g
Honored Contributor III

Re: Sorting chart month formula

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

Not applicable

Re: Sorting chart month formula

Shraddha, thanks for helping

does not work...difficult to figure out why

shraddha_g
Honored Contributor III

Re: Sorting chart month formula

try:

in Sort by expression

num(month(Datefield))

Not applicable

Re: Sorting chart month formula

seems to work!

shraddha_g
Honored Contributor III

Re: Sorting chart month formula

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

Re: Sorting chart month formula

that works excellent everywhere. many thanks

Not applicable

Re: Sorting chart month formula

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