Forum Discussion
Apply conditional formatting to a visual calculation
- Anonymous1 year ago
Hi Anonymous,
Thank you for reaching out to the Microsoft Fabric Forum Community.
Please try creating a single visual calculation measure for Variance and apply conditional formatting using the following DAX query:
Color =
VAR Variance = [Actual Cost] - [Standard Cost]
RETURN
IF (Variance >= 0, "Green", "Red")If the issue continues, feel free to contact us. We are here to assist you.
Best regards,
Prasanna Kumar
Anonymous
You could add another visual calculation
Variance Icon = IF([Variance] > 0, 1, IF([Variance] < 0, -1, 0))
Then, apply conditional formatting with icons to this new column:
Go to the Values section of your table/matrix.
Click the dropdown next to the new column.
Choose Conditional formatting > Icons.
Set the rules:
1 → Green up arrow
-1 → Red down arrow
0 → Yellow dash or neutral icon
Hi, my visual calculations do not seem to allow me to conditionally format them