how is it possible to change the colour of the number in a card if it is -ve to be red and green if it is +ve?
thanks
@arkiboys Yes, it is possible to change the color of the number in a Power BI scorecard card based on whether it is positive or negative. Here’s how you can do it:
- Select the scorecard visual in Power BI.
- In the Visualizations pane, go to the Formatting section and expand the Data Labels option.
- Enable the Conditional formatting option.
- Under the Rules section, click on Add a rule.
- In the Edit rule dialog box, select the field you want to apply the rule to (for example, the Value field).
- In the Format by section, select the Font color option.
- In the Advanced controls section, click on the fx button next to the Font color field.
- In the Expression dialog box, enter the following DAX formula
= IF([Value] < 0, “Red”, “Green”)
This formula checks if the value of the field is less than zero. If it is, it sets the font color to red. If not, it sets the font color to green.
9. Click OK to close the Expression dialog box.
10. Click OK again to close the Edit rule dialog box.
11. You should now see the numbers in the scorecard visual change color based on their sign. Negative numbers will be red and positive numbers will be green.
Note that this approach assumes that you are using a numeric field to display values in the scorecard visual. If you are using a text field or a calculated field that returns text, you will need to modify the DAX formula to use a different color coding scheme or use a different approach altogether
@arkiboys It’s there if you expand the Callout Value.
Please follow these steps.
@arkiboys Further to my above message. I can see the formatting option when expanding the Callout Value.