Forum Discussion
Table Call Value Formatting Options
- 2 months ago
Hi miitch
It looks like the contents of the Status column are DAX-generated SVG images as if they were background conditional formatting, they would have filled the entire cell and not just a portion of it.
Below is a sample measure I used in the status buttons above. This measure is to be categorized as an Image URL
Status SVG Button = VAR _Text = [Status Measure] VAR FillColor = SWITCH ( [Status Measure], "Value A", "#ffb09c", "Value B", "DeepSkyBlue", "Value C", "#FFFFE5", "#D3D3D3" ) VAR FontColor = SWITCH ( [Status Measure], "Value A", "black", "Value B", "white", "black" ) VAR StrokeWidth = IF ( [Status Measure] = "Value C", 2, 0 ) VAR _SVG = "<svg xmlns='http://www.w3.org/2000/svg' width='200' height='70'> <rect x='0' y='5' width='200' height='56' rx='10' ry='10' fill='" & FillColor & "' stroke='#e5e500' stroke-width='" & StrokeWidth & "' /> <text x='100' y='38' font-size='30' font-family='Arial' fill='" & FontColor & "' text-anchor='middle' dominant-baseline='middle'> " & _Text & " </text> </svg>" RETURN IF ( HASONEVALUE ( d_Dimension[Attribute] ), "data" & ":" & "image/svg+xml;utf8," & _SVG )
You're looking for the Font color rule under conditional formatting, not Background color. Select the table or matrix visual, expand Cell elements in the format pane, pick the field you want to format from the dropdown, then toggle Font color on and click the fx button to set it by rules, gradient, or field value. That changes only the text color and leaves the row background untouched, which gives you the highlight look you see in those docs screenshots.
If this helped, a thumbs up and accepting the solution would be appreciated.
Thanks,
Shai Karmani
- miitch2 months agoFrequent Visitor
Thanks for the response!
Unforuntaly I think you misunderstood. The look in the example image I am trying to recreate is not just the blue font color, but the light blue highlight behind the text.
You can see that while the font is blue, the text also has it's own background color that sits on top of the row background color. The issue being, font color only changes the text to blue, and setting "Background color" fills the entire cell and replaces the row background color.