Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I've creted metrix table
I try to do condition Font color as doesn't support me
IF Banana/papaya negative value then Red, if orange, pomo positve value then red.
pls advise on DAX
region Banana orange pomo papaya
US 0.1 0.2 0.4 0.7
Denmark 0.5 0.6 0.3 -0.2
NZ -0.6 0.3 -0.7 0.8
UK 0.5 -0.2 0.6 -0.9
Hi @RajK2 ,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please accept it as a solution and give it a 'Kudos' so other community members with similar problems can find a solution faster.
Thank you.
Hi @RajK2 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @RajK2 ,
We noticed we haven't received a response from you yet, so we wanted to follow up and ensure the solution we provided addressed your issue. If you require any further assistance or have additional questions, please let us know.
Your feedback is valuable to us, and we look forward to hearing from you soon.
Thanks..
Hi @RajK2 ,
Thank you for reaching out to the Microsoft Fabric community.
Could you please try the one listed below:
FontColorMeasure =
VAR _value = [Value]
VAR _type = SELECTEDVALUE('Category'[Type])
RETURN
SWITCH(
TRUE(),
AND(_value <= -0.01, _type IN {"Banana", "Papaya"}), 1,
AND(_value >= 0.01, _type IN {"Pomo", "Orange"}), 1,
0
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I need font color to change for requirement
Hi @RajK2 - Try this updated DAX formula
VAR _value = [Value]
VAR _category = SELECTEDVALUE('Category'[Type])
RETURN
IF(
OR(
AND(_value < 0, _category IN {"Banana", "Papaya"}),
AND(_value > 0, _category IN {"Pomo", "Orange"})
),
"Red",
"White"
)
HOpe this works.
Proud to be a Super User! | |
I try to use Font color = If text = Red then color option
the formula not return Red or white
error : DAX comparison operations do not support comparing values of the text with value of the integer.consider using VALUE or Format function to convert one of the values
Hi @RajK2 can you try below one:
Font Color =
VAR _value = [Value]
VAR _category = SELECTEDMEASURENAME() // Gets the column name dynamically
RETURN
IF(
OR(
AND(_value < 0, _category IN {"Banana", "Papaya"}),
AND(_value > 0, _category IN {"Pomo", "Orange"})
),
"Red",
"White"
)
Hope this helps.
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 40 | |
| 36 | |
| 34 | |
| 31 | |
| 27 |
| User | Count |
|---|---|
| 135 | |
| 103 | |
| 65 | |
| 61 | |
| 55 |