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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
gatesmetbus
Frequent Visitor

YTD not working when year and month slicer used

My YTD measure matches my MTD measure. 

Abated Emergency WO MTD =
VAR SelectedMonth = SELECTEDVALUE('Day'[Month])
VAR SelectedYear = SELECTEDVALUE('Day'[Year])
RETURN
IF(
    NOT(ISBLANK(SelectedMonth)) && NOT(ISBLANK(SelectedYear)),
    TOTALMTD([Abated Emergency Work Orders], 'Day'[Date]),
    BLANK()
)
this gives me back the correct MTD each time. However I had silmair YTD measure it doesn't compute right it just matches the MTD amount. Ive tried to remove the filters within the dax, I've tried other Dax but always matches the MTD or just 0. 
 
I'm trying to recreate the matrix towards the left WITH the slicers.  
Untitled.png
1 REPLY 1
lbendlin
Super User
Super User

Ditch the slicers and use the filter pane instead.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.