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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Change Measure based on Slicer Value

I have a table that contains YTD, MTD, WTD, and 2019

 

I want to write a formula that when the user selects YTD, MTD, or WTD on the slicer it displays the measure 2020 Outlet Status, when a user selects 2019 on the Slicer is displays another Measure 2019 Outlet Status. 

 

Basically I just need 

IF('Period Select'[Period Select]= "2019"

then [2019 Outlet Status]

ELSE [2020 Outlet Status]

END

 

Im having an issue becuase I am not calculating anything- its just classifying outlets. 

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@Anonymous 
If MTD YTD WTD and 2019 are 4 columns, you would need to create a new slicer table name it as slicer column.slicer column.JPG

 

Measure = IF(SELECTEDVALUE('Slicer Table'[Slicer Column])="2019",[2019 Outlet Status],[2020 Outlet Status])

 

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Anonymous 
If MTD YTD WTD and 2019 are 4 columns, you would need to create a new slicer table name it as slicer column.slicer column.JPG

 

Measure = IF(SELECTEDVALUE('Slicer Table'[Slicer Column])="2019",[2019 Outlet Status],[2020 Outlet Status])

 

 

Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , You have try very similar to what have been done here

https://community.powerbi.com/t5/Community-Blog/Display-Label-Only-on-the-Last-Data-Point-of-the-Line-Visual-for/ba-p/1253464

or

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors