Hi i need help to make conditional formatting but each row depends on different value.
at 'On Hand qty', the background color depends on the 'Target quantity' such as:
on the fifth row, 'target quantity' is 3,
so if 'on hand qty' >= 3 is green, and 3 < is red
on the seventh row, 'target quantity' is 13,
so if 'on hand qty' >= 13 is green, and 13 < is red
Solved! Go to Solution.
Hi @muhaiza ,
If on hand qty and target quantity are measure then try this:-
measure 3 = if( [OnHand Qunatity] >= [target quantity] , "Green","Red")
or if those are column then use below code:-
measure 3 = if( sum(table[OnHand Qunatity]) >= sum(table[target quantity]) , "Green","Red")
Now add this measure like below for conditional formatting:-
@muhaiza , Create a new color measure
Switch( True() ,
[target quantity] = 3 && [OnHand Qunatity] >=3 , "Green",
[target quantity] = 3 && [OnHand Qunatity] < 3 , "Red",
[target quantity] = 13 && [OnHand Qunatity] >=13 , "Green",
[target quantity] = 13 && [OnHand Qunatity] <13 , "Red"
Change the value as per need. Use in conditional formatting using field value option
How to do conditional formatting by measure and apply it on pie? : https://youtu.be/RqBb5eBf_I4
Hi @amitchandak , Thank you!
Sorry, i'm still new to this but why it says 'cannot find name'?
do i need to declare something first?
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!