The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I have a slicer which gives the option to choose between Japan, Korea or both. I also have a Target for each which changes for Japan, Korea or total - so what I mean is that if Japan is chosen my current value should be compared to a 15% and conditional formatted accordingly. If Korea is chose it should be compared to 16% and if both are chosen then it should be compared to 14.5%. Kindly advise how I can conditional format according to the restriction above.
Solved! Go to Solution.
Hi, @Anonymous ;
You could create a measure such as:
measure =
SWITCH (
SELECTEDVALUE ( 'table'[country] ),
"Japan", SUM ( [value] ) - 0.15,
"Korea", SUM ( [value] ) - 0.16,
IF (
CALCULATE (
DISTINCTCOUNT ( 'table'[country] ),
FILTER ( ALLSELECTED ( 'table' ), [country] IN { "Korea", "Japan" } )
) = 2,
SUM ( [value] ) - 0.145
)
)
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous ;
You could create a measure such as:
measure =
SWITCH (
SELECTEDVALUE ( 'table'[country] ),
"Japan", SUM ( [value] ) - 0.15,
"Korea", SUM ( [value] ) - 0.16,
IF (
CALCULATE (
DISTINCTCOUNT ( 'table'[country] ),
FILTER ( ALLSELECTED ( 'table' ), [country] IN { "Korea", "Japan" } )
) = 2,
SUM ( [value] ) - 0.145
)
)
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.