Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

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
qlikrajan
Contributor III

Re: How to Sort Month Starting on April?

could you please share your data or app

simone_spanio
Valued Contributor

Re: How to Sort Month Starting on April?

See the qvw attached.

Is this you are searching for?

S.

Not applicable

Re: How to Sort Month Starting on April?

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

Re: How to Sort Month Starting on April?

Sorting  expression

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

Hope this helps

regards

Marco

simone_spanio
Valued Contributor

Re: How to Sort Month Starting on April?

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

Re: How to Sort Month Starting on April?

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

Not applicable

Re: How to Sort Month Starting on April?

Hi,

Refer this link,This may help you.

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

Regards

Sudha

Highlighted

Re: How to Sort Month Starting on April?

hope this helps

regards

Marco

maternmi
Contributor II

Re: How to Sort Month Starting on April?

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