Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I need to change the font color to a specific label of a expression based on a conditional.
I have a straight table, because I need different sizes of dimensions and expressions and the pivot table does not allowed it.
Please advise.
Thanks!
I think this will be helpful: Colors in charts
- Marcus
Hi Melba,
Can you please explain the problem in more detail? Based on what condition you want to change your color?
For now, I will suggest you to try below two options.
1. Visual Cues tab in the table properties.
- Here you can specify colors based on upper limit and lower limit.
2. Expand the expression and select "Text Color" option from the list.
- Here you can specify your condition to apply colors.
Let me know if this is helpful.
Thanks,
Akash.
Hi,
Try with right click on the Expression label and "Custom Format Cell"
Click on Text Color and add the condition in "Calculated" - Base Color:
Hope this can help!
Thank you Vincenza
I tried that, but in the expression, how can I refer to the especific label I need?
The condition is the label value, My client needs different colors in every label.
The pint is how I can specify the cell that I am going to change the color.
Hi Melba,
Instead of on the header, click on the expression data cell and all the default options will display: "Current Expression", "All Expressions" and "All Dimensions and Expressions".
hm!..but this will change the values cell color..
it seems that the only available option for the header is Apply change to "All Dimension".. sorry!
Yes, that is the point.
Thank you.
[Labels]:
LOAD
Label
,rgb(R,G,B) as Color
INLINE [
Label,R,G,B
Label1,255,0,0
Label2,0,255,0
Label3,0,0,255
etc.
];
SET vColor = alt(max([Color]),rgb(180,180,180));
In the chart, click on the + next to the Label dimension, click on background color, Edit, use $(vColor) as the expression. Or skip the variable if there's only one place you want this color, but generally, if I'm coloring specific values of a field, I want to use those colors consistently throughout my app.