Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
When we use the quarter function in Qlikview, we get months 1,2,3 as Q1 ... 4,5,6 as Q2 etc..
My requirement is to load months 4,5,6 as Q1 ... 7,8,9 as Q2 ... 10,11,12 as Q3 and 1,2,3 as Q4.. I want to do this in the load script..
Any help would be appreciated.
Thanks,
Sakshat
Sorry, try this:
ceil((mod(Month+8,12)+1)/3)
Hi,
Just to add, I have tried using the If statement and LOAD INLINE...
though the If statement works, it is too long... Any shorter way to do this would be great!
This will work, if Month is a numeric representation of month:
ceil((mod((Month+9),12))/3)
If you base it on date, it will be:
ceil((mod((month(Date)+9),12))/3)
Hi Michael,
Thanks for your reply. This formula works for all months except month 3 ..... there it evaluates to Q0
--Sakshat
Sorry, try this:
ceil((mod(Month+8,12)+1)/3)
Awesome ... this works .. thanks a ton!