Forum Discussion
Anonymous
6 years agoNot applicable
Conditional Formatting font text Amber
Is there a way to change the font colour of a text column [BRAG STATUS] with the values "Green", "Amber" & "Red" I'm able to use conditional formatting to get a value by field for the first value...
- 6 years ago
Anonymous
BRAG STATUS Column2 Red 1 Amber 2 Green 3 Red 4 Amber 5 Green 6 Red 2 DAX measure
Conditional_Colour_Format = VAR __status = CALCULATE ( FIRSTNONBLANK ( audit_results[BRAG STATUS], TRUE () ) ) VAR __color = SWITCH ( __status, "Green", "#4CAF50", "Amber", "#FFC107", "Red", "#f44336" ) RETURN __color
Anonymous
6 years agoNot applicable
I have this measure but it cant load the data for the visual:
color =
switch ( true(),
FIRSTNONBLANK('audit_results'[BRAG STATUS],"NA") ="GREEN" && sum('audit_results'[BRAG STATUS]) ="GREEN","lightgreen",
FIRSTNONBLANK('audit_results'[BRAG STATUS],"NA") ="RED" && sum('audit_results'[BRAG STATUS]) = "RED","red",
)
The error is "MdxScript(Model) (22,70) Calculation error in measure 'audit_results'[color]: The function SUM cannot work with values of type String
Anonymous
6 years agoNot applicable
HI Anonymous ,
See if this helps.
https://exceleratorbi.com.au/conditional-formatting-with-a-text-field-in-power-bi/
Regards,
Harsh Nathani