Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Month order starting April

Hey guys I am using a fiscal calendar where I want my months displaying as beginning from April instead of Jan.

I've used =match(MONTH,'Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec','Jan','Feb','Mar') in the sort order.

Now although it works initially the sort order screws up as soon as you make a selection or filter on any particular dates.

Any ideas please ?

4 Replies
buzzy996
Master II
Master II

try this,if u have master calendar script "SET vFiscalOffset = 6;" just replace 6 with 4 and see?

maxgro
MVP
MVP

i think using dual and sort numeric

tmp:

load

  date(makedate(2015) + rowno() -1) as date

AutoGenerate 365;

cal:

load

  dual(month(date), Mod(month(date)-4, 12)+1) as month,

  year(date) as year,

  date

Resident tmp;

drop Table tmp;

1.png

MarcoWedel

Not applicable
Author

Sorry guys not having a huge amount of joy with this.

My script is as follows :

Date:
LOAD
$(vDateField)
,
Month($(vDateField)) as MONTH
,
MonthName($(vDateField)) as MONTH_YEAR
,
Year($(vDateField)) as YEAR
,'Q'&
Ceil(Month($(vDateField))/3) as QUARTER
,
Year($(vDateField)) &'-Q'& Ceil(Month($(vDateField)) / 3) as QUARTER_YEAR

////////// Fiscal Year: Apr-Mar
     ,Year(AddMonths($(vDateField), +3)) as FISCAL_YEAR

,
MonthName(AddMonths($(vDateField), -3)) as FISCAL_MONTH_YEAR
,'Q'&
Ceil(Month(AddMonths($(vDateField), -3)) / 3) as FISCAL_QUARTER

FROM SOURCE