Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
A while ago I suggested adding YTD and PYTD flags to the 7.CalendarGen.qvs script:
if(YearToDate([$(vL.DateFieldLinkName)], 0, 4, $(vL.CalendarGenToday)),1,0) AS [$(vL.CalendarTableName) Fiscal YTD Flag],
if(YearToDate([$(vL.DateFieldLinkName)], -1, 4, $(vL.CalendarGenToday)),1,0) AS [$(vL.CalendarTableName) Fiscal PYTD Flag]
This was added to the script and now appears as:
if(YearToDate([$(vL.QDF.DateFieldLinkName_new)], 0, $(vL.QDF.MonthsLeftFiscalDates), $(vL.QDF.CalendarGenToday)),1,0) AS [$(vL.QDF.CalendarTableName) Fiscal YTD Flag],
if(YearToDate([$(vL.QDF.DateFieldLinkName_new)], -1, $(vL.QDF.MonthsLeftFiscalDates), $(vL.QDF.CalendarGenToday)),1,0) AS [$(vL.QDF.CalendarTableName) Fiscal PYTD Flag]
However these flags are only returning a "0"
I'm based in the UK, so my month offset is 4 as per the first example. The $(vL.QDF.MonthsLeftFiscalDates) variable I use is normally -3 so could be part of the problem.
Grateful if someone could investigate please.
Thanks
Ian
Hey Damian
Here you go: Qlik-Deployment-Framework/7.CalendarGen.qvs at patch-2 · iPFT/Qlik-Deployment-Framework · GitHub
Thanks
Ian
Hi Ian,
I had a quick test and it looks great. The only nuance I see is if you specifically wanted a Fiscal Calendar created that ran from Jan - Dec. If you put in 12 there is no issue. However if you put in in -12 then the fiscal year is the previous year. However this scenario does not make sense as the Fiscal Year is the annual year.
Damian
Hi Ian, the fix is approved and committed. Have also updated the deploy package:Qlik Deployment Framework Deploy Tool
Best regards
Magnus
Magnus, great news thank you. I'll update out Development Env today and do some testing.
Damian, thank you too for applying the initial fix and for your promptness.
Have a good day all
Kind Rgds
Ian