Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.