Forum Discussion

Midway's avatar
Midway
Helper I
1 year ago
Solved

Help with a DAX YTD Cummulative Query

Hi there,    I'm trying to show in a card the YTD Sales budget in a cummulative way. So when a Month (data point) is selected in a Bar Chart, the Card is supposed to show the Cummulative Sales budg...
  • Jihwan_Kim's avatar
    1 year ago

    Hi,

    Please check the below picture and the attached pbix file.

    I tried to create a sample pbix file like below.

    One of ways is using DATESYTD DAX function in the measure.

     

    DATESYTD function (DAX) - DAX | Microsoft Learn

     

     

     

     

    Sales Budget YTD: = 
    CALCULATE (
        SUM ( budget[salesbudget] ),
        DATESYTD ( 'calendar'[Date], "12-31" )
    )