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

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Last Year YTD (Financial Year)

Hey all,

I have a requirement to write a set analysis expression to calculate Last Year YTD.

My YTD formula is : Sum({$<Month =>} If(InYearToDate(GLTranDate, vMaxDate, 0, 7), GLProfitLossTranAmount))

I have created a variable called vLYMaxDate, which is vMaxDate - one year. But I can't use this effectively.

The user makes selections on Month and FinYear.

Thanks...

Labels (1)
2 Replies
avastani
Partner - Creator III
Partner - Creator III

use variables to read in the Month and FinYear and translate that to a date start or end of month to use for your purpose. just a suggestion.

need more detail for a better reply. what do the Month and FinYear define? the max date? the date to verify if in year?

Not applicable
Author

Hello,

this is what I use for my LY YTD calculations but our fiscal year starts in October. You can adjust FinYear={'$(=(if(month(today())>=10 the 10 depending what month your financial starts at, ie) 10 being october.


sum( {$<GLTranDate={'<=$(=makedate(year(today())-1,month(today()),day(today())))'},FinYear={'$(=(if(month(today())>=10, Year(today())+1, Year(today()))-1))'} >} GLProfitLossTranAmount)