This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowThe Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more
Hi,
I'm trying to conditionally format the data lable of a column chart, based weather the value is positive (green) or negative (red)
However, when trying to format based on 'Field Value', the dropdown box for 'What field should we base this on?' is outlined red, and it doesn't let me select my measure.
This is how my measures looks like:
%Change_Tagessatz =
VAR Change =
DIVIDE(
[Ø Tagessatz] - [Ø Tagessatz_LY],
[Ø Tagessatz_LY]
)
RETURN
FORMAT(Change, "0.0%")
%Change_Tagessatz_Color = IF( [%Change_Tagessatz] > 0, "Green", "Red")
In the dropdown box I want to put the 2. measure (%Change_Tagessatz_Color)
Any ideas?
Solved! Go to Solution.
Hi @Janica123 -You need to create a measure that returns a numeric or color code value. The best approach is to use color codes (Hex or RGB) instead of text
link:
Color Hex Color Codes (color-hex.com)
This measure returns the Hex color code for green when the value is positive and red when the value is negative.In the "Based on field" dropdown, select your measure.
Hope it helps.
Proud to be a Super User! | |
Hi @Janica123
I noticed a problem with your measures.
When you format the result using FORMAT, it returns a text value which you won't be able to compare to zero in your second measure.
Format the measure using the formatting ribbon if required.
Hi @Janica123 -You need to create a measure that returns a numeric or color code value. The best approach is to use color codes (Hex or RGB) instead of text
link:
Color Hex Color Codes (color-hex.com)
This measure returns the Hex color code for green when the value is positive and red when the value is negative.In the "Based on field" dropdown, select your measure.
Hope it helps.
Proud to be a Super User! | |
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
| User | Count |
|---|---|
| 24 | |
| 22 | |
| 19 | |
| 17 | |
| 14 |
| User | Count |
|---|---|
| 32 | |
| 28 | |
| 23 | |
| 20 | |
| 20 |