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

Sorting in bar chart

Hi all,

I have month file(Jan,feb...dec) order....but my requirement is I need sep,oct,nov,dec,jan and feb order in bar chart.

please help me.

5 Replies
MK_QSL
MVP
MVP

Got to Sort Tab

Tick Expression

Write Below in Expression Definition

=Only({1}Match(UPPER(Month),'SEP','OCT','NOV','DEC','JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG'))

Anonymous
Not applicable
Author

Calendar starts in October?  When creating month in the script, use dual this way.

dual(month(Date), if(month(Date)>=10, month(Date)-9, month(Date)+3)) as Months

Now you can sort Month by numeric value, October will be 1 and September is 12

Edit:  Just noticed it starts in September, that is

dual(month(Date), if(month(Date)>=9, month(Date)-8, month(Date)+4)) as Months

pokassov
Specialist
Specialist

Hello!

You can use sort and write expression. If you have field in your calendar with data like "Apr 2014", you would use it.

In the other hand you can write your own expression like in my example.

Nevertheless, what have to do your chart, if you choose to years and equal months?

Sergey

Not applicable
Author

Use Mapping Load, ApplyMap and Dual

MONTH_SORT:

Mapping LOAD * INLINE

[

MNTH, SORT_NUM

SEP, 1

OCT, 2

NOV, 3

DEC, 4

JAN, 5

FEB, 6

MAR, 7

APR, 8

MAY, 9

JUN, 10

JUL, 11

AUG, 12

];

And use dual() where Month field is being loaded as below

Dual(Month,ApplyMap('MONTH_SORT',Upper(Month))) as Month

Regards,

KKR

MarcoWedel

Hi,

another solution could be this sorting expression:

=Mod(Month-9,12)

QlikCommunity_Thread_158538_Pic1.JPG

QlikCommunity_Thread_158538_Pic2.JPG

hope this helps

regards

Marco