Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello all,
I am having an issue with a YTD calculation not working when selecting an earlier date on the date slicer. It works fine when the max date is selected, but if I choose another date it only shows the values for that date period only, not a YTD total up until that date (like I would want). Here is my measure:
YTD% = CALCULATE([CountDistinctIOPs],DATESYTD('Date Table'[Date])
Source 2020 YTD
A 49
B 32
C 25
D 10
E 9
F 4
G 4
H 4
I 1
Total 138Above is what I get with max date selected. Let's say the previous month YTD was less by 30, I would want to see this when that date is selected.
Source 2020 YTD
A 39
B 22
C 20
D 10
E 4
F 4
G 4
H 4
I 1
Total 108However, I am getting this which is the total for that month only.
Source 2020 YTD
A 10
B 6
C 5
D 4
E 3
F 2
G 1
H 0
I 0
Total 31
Well, would probably need to see the formula for the measure.
See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
That is strange you cannot see it in the post - it's there with some sample data you probably can't see. The calculation is just a simple: calculate([MyCountMeasure]),DATESYTD(DateFieldFromDateTable)
My date table is marked as a date table. Hope that helps...
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 33 | |
| 31 | |
| 19 | |
| 12 | |
| 11 |