Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi friends,
How to write the YTD expression when financial year start from April.
Thanks
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.
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