Forum Discussion

ashmitp869's avatar
ashmitp869
Responsive Resident
2 years ago
Solved

Dax expression calculation help

Hi,

 

I have only selected the project number with no Year and Month Name selection and export the data.

 

I need to calculate the YTD of Extended Amount if I select Year as 2024 

The FY should be 2024 and Taking all Transaction Date until the last of month selected on Month Name .

I am attaching the excel file . The yellow part should be inculded to calcualte the YTD Budget.

 

 

7 Replies

  • ashmitp869 , You should able to do that using a date table joined with date of your table and using a measure like

     

    example

    YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))

     

    Time Intelligence, Part of learn Power BI https://youtu.be/cN8AO3_vmlY?t=27510
    Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
    Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

    • ashmitp869's avatar
      ashmitp869
      Responsive Resident

      Hi amit,

      If I do that its not doing the sum of amount for last year transaction date though its under 2024 FY.Please see the below screenshot marked in Red.

       

       

  • Hi,

    What's the start of your FY?  Share the download link of your PBI file.

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

        In the measure shared by Amit, replace 12/31 with 5/31.

        Hope this helps.