Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
WernerDC
Creator
Creator

Fiscal Year Variable

Hi Guys, I hope you can help me. I have these variables in a App. 

 

let vDateToday = date(floor(now()));
let vDateStartMTD = date(makedate(year(vDateToday),month(vDateToday),1));
let vDateStartYTD = date(makedate( if( month(vDateToday)<=2,year(vDateToday)-1,year(vDateToday) ), 3, 1 ));
let vDateStartYTDPY = date(makedate( if( month(vDateToday)<=2,year(vDateToday)-1,year(vDateToday)-1 ), 3, 1 ));
let vDateEndYTDPY = date(MonthEnd(makedate( if( month(vDateToday)<=2,year(vDateToday)-1,year(vDateToday) ), 2, 1 )));

 

How do I create one that looks at the Financial year as a whole? I want to create a button than says Full Financial year!

I currently have Year to Date , Year to date - Prior Year & Month to Date. I want to create a (Full Financial Year Button)

 

Hope you can help me

3 Replies
Dalton_Ruer
Support
Support

If you look at the function InYearToDate you will see that you can set the period for when your fiscal year begins. 

https://help.qlik.com/en-US/sense/February2021/Subsystems/Hub/Content/Sense_Hub/Scripting/DateAndTim...

You can add that as another flag in your load script that relates to the Fiscal Year. 

WernerDC
Creator
Creator
Author

Hi, thank you. Can you maybe provide me with an example?

 

Our Fiscal Year runs from 1-March to 29-Feb each year.

 

Kind regards

Dalton_Ruer
Support
Support

Here are a whole bunch of samples. Search for InYearToDate and you will see example of Fiscal Year in October (month 10)