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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calendars and Fiscal Quarters?

Hi

I have set up a calendar for my standard days/weeks/months/quarters/years for operational dates which run true to the calendar, however we also run a fiscal calendar from Jan to Dec but, we do have months that run 4 (weeks) 4 (weeks) 5(weeks) which is one Quarter. How would I define this using a start date for week 1 as >= 01/01 and an end date for the final week and quarter 4 as <=31/12 irrespective of year?

I was thinking of an IF statement based on WeekNo and day/month. so

IF weekno<=13 AND day/month >01/01, Q1,

IF weekno>=14 AND weekno<=26 , Q2,

IF weekno>=27 AND weekno<=39 , Q3,

IF weekno>=40 AND day/month <31/12, Q4,

AS Fiscal Quarter

Or is their a better neater way to do this, as my next issue is that the fiscal week numbers runs from Sunday to Saturday...

Any suggestions appreciated...I'm new to qlikview and this type of coding so apologies for any syntax errors!!!!

...Thanks

Labels (1)
3 Replies
Not applicable
Author

try this

'Q'&

If(Match(Month(Date),'Jan','Feb','Mar') > 0 , 1,

If(Match(Month(Date),'Apr','May','Jun') > 0 , 2,

If(Match(Month(Date),'Jul','Aug','Sep') > 0 , 3, 4))) AS Quarter,

Not applicable
Author

Thanks for the reply I found a solution around week number using a single staement which set them correctly to 445 starting on 1st Jan and ending on 31st Dec...all sorted now thanks.

Not applicable
Author

Do you have a link to where I could find this solution or be willing to explain what you did? I'm struggling with the same thing.