Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to Sort Month Starting on April?

Have this sort expression that isn't working for me right now. I basically want the graphs to start on April instead of January:

=match(month([DS-Date]),'Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec','Jan','Feb','Mar')

I tried with full month names as well with same results. Thanks!

9 Replies
Anonymous
Not applicable
Author

could you please share your data or app

simospa
Partner - Specialist
Partner - Specialist

See the qvw attached.

Is this you are searching for?

S.

Not applicable
Author

This is exactly how I want it to show but can't figure out how to get it to work. How should I load my "Date" column and what expression should I use?

My date data is formatted as MM/DD/YYYY

I'm using this in the script as well

LOAD * INLINE [

    MonthsName, MonthsID, MonthsOrder

    Jan, 1, 10

    Feb, 2, 11

    Mar, 3, 12

    Apr, 4, 1

    May, 5, 2

    Jun, 6, 3

    Jul, 7, 4

    Ago, 8, 5

    Sep, 9, 6

    Oct, 10, 7

    Nov, 11, 8

    Dec, 12, 9

];

and sorting by expression: MonthsOrder

MarcoWedel

Sorting  expression

=Mod(Month([DS-Date])+8,12)

Hope this helps

regards

Marco

simospa
Partner - Specialist
Partner - Specialist

You could extract the month in load script.

LOAD ......, month(DS-Date) as MonthsID

Or, if date is a string, extract che part with Num(left(DS-Date,2)) as MonthsID

Let me know.

Hi

S.

anbu1984
Master III
Master III

If it is not working using MonthsOrder, can you post sample app

Not applicable
Author

Hi,

Refer this link,This may help you.

http://community.qlik.com/blogs/qlikviewdesignblog/2013/05/28/fiscal-year

Regards

Sudha

MarcoWedel

hope this helps

regards

Marco

maternmi
Creator II
Creator II

Hi Jason,

I guess in your case is April the first month of the fiscal year, isn't it?

Why you don't create in your master calender  fiscal data, like fiscal month, fiscal year?

at first you need a variable

set vFM=4;

then use the following formular

Mod(C_Month-$(vFM),12)+1 as FiscalMonth,

with the result that April is the first fiscal month.

May = 2

June = 3

.... = ...

BR

Michael