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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I want to format number and color with dax. It works with "0,,M" but also I want to change the color. Could you help me to fix the following ?
Thanks
Solved! Go to Solution.
Hi, @cristianml
Formatting numbers and setting colors need to be separated into two Dax. I briefly simulated some data hoping it would fit your situation.
Measure1:
VAR VAR1 = "Revenue Actual:" & FORMAT([Actual Revenue], "0,,M")
Measure2:
Color =
IF([VAR VAR1]="Revenue Actual:" & FORMAT([Actual Revenue], "0,,M"),"#00d600")
Then select the field to which you want to apply the color. Select the font color in conditional formatting.
The color needs to be set separately with Measure.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @cristianml
Formatting numbers and setting colors need to be separated into two Dax. I briefly simulated some data hoping it would fit your situation.
Measure1:
VAR VAR1 = "Revenue Actual:" & FORMAT([Actual Revenue], "0,,M")
Measure2:
Color =
IF([VAR VAR1]="Revenue Actual:" & FORMAT([Actual Revenue], "0,,M"),"#00d600")
Then select the field to which you want to apply the color. Select the font color in conditional formatting.
The color needs to be set separately with Measure.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Read my article here https://exceleratorbi.com.au/conditional-formatting-with-a-text-field-in-power-bi/
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.