Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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?
Solved! Go to Solution.
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 )
)If you have any question, feel free to ask me.
Best regards
Maggie
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 )
)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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!