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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
daisy1438
Contributor III
Contributor III

YTD expression for when financial year start from April

Hi friends,

How to write the YTD expression when financial year start from April.

Thanks 

2 Replies
Vegar
MVP
MVP

Try something like this. 

Sum({$<Year, Month,Date={">=$(=yearstart (max(Date), 0,4)<=$(=today())" } >} Amount)

Notice that I cancel out Year and Month, you should do this for all selectable fields from your master calendar. 

H_Julian
Contributor III
Contributor III

Write a new Dimension in your Mastercalendar

 

if(Month(Datefield)>=4,

 Makedate(Year(Datefield),Month(Datefield)-3,Day(Datefield)),

  Makedate(Year(Datefield)-1,Month(Datefield)+9,Day(Datefield))

as Date Fiscal Year

Then you can write in your Set Analysis instead of your original Datefield

Original:

Sum({<Date={'>=01.01.2020<=31.01.2020'}>}Value) //Value from 1st of January 2020 to 31st of January 2020

New Date Field:

Sum({<[Date Fiscal Year]={'>=01.01.2020<=30.01.2020'}>}Value) //Value from 1st of April 2020 to 30st of April 2020