Forum Discussion
Anonymous
6 years agoNot applicable
Prior FYTD - Having Issues
I'm currently working on an all too common report where I want to show the dollars spent Fiscal YTD against Prior FYTD down to the day. I'm using the below DAX formula to successfully calculate FYTD, accounting for our fiscal year that ends on June 30. But I've gone through the forums and seen this problem crop up time and time again and none of the proposed solutions have succesfully worked. I do have a separate calendar table set up that reflects our Fiscal Year.
Amount FYTD = CALCULATE(SUM('Travel Expenses'[AMOUNT]),DATESYTD('Calendar'[Date], "06/30"))
For PFYTD I've tried
Amount PFYTD = CALCULATE([Amount FYTD],SAMEPERIODLASTYEAR('Calendar'[Date]))
This returned the entire dollar amount spent for all of the previous Fiscal Year.
The DAX below that I found here on the forums also returned the exact same value as the above DAX.
CALCULATE ( [FYTD Measure], DATEADD ( 'Calendar'[Date], - 1, YEAR ) )
4 Replies
- parry2kSuper User
Anonymous in your base measure Amount FYTD you are adding full FY data, since there is no future dated data, it looks like you are summing upto date but Sameperiodlastyear is giving you full last fical year.
Either you look at paralledperiod function or filter your base measure to current date and PY FYTD will work
- AnonymousNot applicable
Could you give me an example of what those functions would like like with parallel period etc... or using today's date?
- AnonymousNot applicable
parry2k could you see my above reply?
- v-chuncz-msftCommunity Support
Anonymous
For any time intelligence function, you could implement a custom DAX formula.
https://www.sqlbi.com/articles/time-intelligence-in-power-bi-desktop/