Forum Discussion
Conditional formating using DAX
- 2 months ago
c_banerjee Same measure mentioned I have used for checking Sales in below table and added conditional formatting to Region as below -
💡 Helpful? Give a Kudos 👍 — keep the community growing
✅ Solved your issue? Mark as Solution ✔️ — help others find it faster
Best regards,
Rupasree Achari | BI & Fabric Analytics Engineer
Hi,
Your DAX measure looks fine, but whether you can use it for conditional formatting depends on the visual you're using.
A few things to check:
Make sure you're using a visual that supports conditional formatting (such as a Table or Matrix).
Select the visual, then in the Values well, click the drop-down arrow next to the Margin field and look for Conditional formatting (or Cell elements in newer versions of Power BI).
Choose Background color or Font color, then select Format by → Field value and choose your Margin Color measure.
If you don't see the Conditional formatting option:
Verify that you're using a Table or Matrix visual, as not all visuals support field-value formatting.
Ensure the measure returns valid color names (e.g., "Red", "Orange") or hexadecimal color codes (e.g., #FF0000), which are generally more reliable.
Confirm that the field you're formatting is in the Values section of the visual.
Could you let us know:
Which visual are you using (Table, Matrix, Card, etc.)?
Which version of Power BI Desktop are you using?
Are you trying to color the text, the background, or something else?
The Microsoft documentation on conditional formatting may also help:
https://learn.microsoft.com/power-bi/create-reports/desktop-conditional-table-formatting
If you found this reply helpful, please consider giving it a Kudos. If it helps resolve your issue, marking it as the Accepted Solution will help others facing the same problem.