Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

TOTALYTD is not working

I want to get the YTD amount fiscal year starting from April 1. The Dax code  I have used is Sales FYTD = CALCULATE ( [Total FactPriSales], DATESYTD ( DimDate[Date], "3/31"...
  • amitchandak's avatar
    amitchandak
    5 years ago

    Anonymous ,

    Please note that when you do NOT use the date slicer of a date filter, then the last date of the calendar will be taken as the date to end YTD.

     

    Now you can stop your calendar today. As this was no created in power BI, You might not able to do that.

     

    You have to use a filter/slicer in this case. Some Date context is needed

  • v-henryk-mstf's avatar
    5 years ago

    Hi Anonymous,

     

    I checked your measure and created the table. I found the problem. The context of your measure provides a value environment for the formula. Cause total to be empty. I made a modification for this. At the moment, putting the measure in the card can correctly display the value of Sales DATEYTD.


    Here is the pbix file.

     

    Best Regards,
    Henry

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.