Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

YTD not working with date slicer

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	138

Above 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	108

 However, 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

 

 

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

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...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

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...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.