Forum Discussion
Conditional formatting based on rules
- 1 year ago
The option switching to percent is bug but it uses the option selected when applied. Alternatively, you can write a measure that returns a color based on certain conditions and use it in conditional formatting as field value (select field value instead of rules).
SWITCH ( TRUE (), [my measure] < 0, "color/hex/rgb/rgba", [my measure] > 0, "color/hex/rgb/rgba", "black" ) --use certain colors like red, blue, green, gold, gray, etc which Power BI can interpret --use hex, RGB or RGBA colors
New_worker , Please check some are number some are percent. If you have percent measure. It is also a number usually between 0 to 1 like 25 % is usually .25.
Percent here means distribution. means I want 1% to 50% of the data as red.
Please correct all percent as number are try out
Thanks amitchandak for the reply.
Could you help explain why West (-33K) cannot be matched with the orange condition when it is placed as the third condition but can be matched when it is placed as the last one? I think -33K should be under 50%-100% data range, so it should be marked in orange when it is placed as the third condition, but it is not...