Forum Discussion
if else with conditional formatting
- 3 years ago
Hi SalimTX ,
According to your description, I create a sample.
Here's my solution, create a measure.
Color = IF ( MAX ( 'Table'[KBB_value] ) <> 0 && MAX ( 'Table'[KBB_value] ) = MAX ( 'Table'[car_salvage_value] ), "Red", "Green" )As car_salvage_value and KBB_value are columns in my sample, I use MAX to reference the current value. IF they're measures in your model, you can remove the MAX in the code.
Then in the visualizations pane, select drop-down option of the column you want to change font color>Conditional formatting>Font color.
Select the measure in the dialog.
Get the result:
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Do you want to create a measure to be used in conditional formatting?
If so, what is car_salvage_value and what is KBB_value? Is this column name in a table or measures? Is it number or text value?
Could you provide an example dataset?
Marius