Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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 budget for the month. So from the table below, if January is selected, the Card will show 10, if February is selected the card will show 23 or so on. If no selection, the card will show the sum of all months in the table.
Can someone help me to figure this out?
| Date | SaleBudget |
| 2025-01-31 | 10 |
| 2025-02-28 | 13 |
| 2025-03-31 | 50 |
| 2025-04-30 | 20 |
| 2025-05-31 | 30 |
| 2025-06-30 | 90 |
| 2025-07-31 | 30 |
| 2025-08-31 | 65 |
| 2025-09-30 | 45 |
| 2025-10-31 | 20 |
| 2025-11-30 | 78 |
| 2025-12-31 | 65 |
Many thanks in advance!
Solved! Go to Solution.
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" )
)
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" )
)
Var maxdt = max(table[date])
Return
Calculate (
Sum( table[sales budget]),
Table[date] <= maxdt &&
Year(Table[date] ) = year(table[date])
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |