Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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/
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
78 | |
58 | |
35 | |
32 |
User | Count |
---|---|
99 | |
59 | |
56 | |
46 | |
40 |