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.
hi,
quick question. need to know if a single formula can satisy the following
If car_salvage_value = KBB_value and KBB_value <> 0 then true else false with the font values showing in different colors based on the condition
The former part is simple however the latter one is somewhat giving trouble
Thanks,
Solved! Go to Solution.
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 _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thank you for your response!
We were able to make it work with two steps process however your suggestion would work.
Marking your reponse as an accepted solution
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
User | Count |
---|---|
73 | |
70 | |
38 | |
23 | |
23 |
User | Count |
---|---|
96 | |
94 | |
50 | |
42 | |
40 |