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
pandakillsalot
Helper II
Helper II

How to make the measurement change with the slicer?

Hi all,

 

I am trying to calculate a rate, which should be equals to (pass number) / (serial number) if before 2018 and should be equal to constant one after 2018. My report also uses data as a slicer to show different pass rate for different months.

 

I realize that in my implementation since the date is an arbitrary value when I choose my slicer, it will only result  in one kind of one calculation way instead of counting both of them. For example. if the date is 2018/1/1, it will give me all "1", even for the 2017/1/1.

 

Any thoughts to deal with it?

 

 

 

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi pandakillsalot,

It needs to display value1 before 1/1/2018, and value2 after 1/1/2018, is it?

If so, This measure could help

Measure 2 =
IF (
    MAX ( StressProduction[Date] ) < DATE ( 2018, 1, 1 ),
    MAX ( [NumberPassesCorrect] ) / MAX ( [Unique SN count] ),
    DIVIDE ( 1, 1, 0 )
)

15.jpg

16.jpg

If you have any question, feel free to ask me.

Best regards

Maggie

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi pandakillsalot,

It needs to display value1 before 1/1/2018, and value2 after 1/1/2018, is it?

If so, This measure could help

Measure 2 =
IF (
    MAX ( StressProduction[Date] ) < DATE ( 2018, 1, 1 ),
    MAX ( [NumberPassesCorrect] ) / MAX ( [Unique SN count] ),
    DIVIDE ( 1, 1, 0 )
)

15.jpg

16.jpg

If you have any question, feel free to ask me.

Best regards

Maggie

Thank you so much, it worked. I didn't even know that I should compare data in data() function. Thank you so much.

pandakillsalot
Helper II
Helper II

question_1.PNG

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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