Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

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

  • 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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Could you give me an example of what those functions would like like with parallel period etc... or using today's date?

    • Anonymous's avatar
      Anonymous
      Not applicable

      parry2k could you see my above reply?