Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Margaret
Creator II
Creator II

dimension conditional text color

If a field = 'N' I want the 'N' to be displayed in red, if it is = 'Y', I want 'Y' in Green. I tried this, but it doesn't work:

=if(Conf_Rec_Date='N', Red(Conf_Rec_Date), Green(Conf_Rec_Date))

What am I doing wrong?

Thanks!!

1 Solution

Accepted Solutions
sunny_talwar

Oh I see, is this for a dimension or expression?

For dimension:

Capture.PNG

For expression:

Capture.PNG

Try using the same expression as above

View solution in original post

7 Replies
sunny_talwar

You want the color of the text box to be read or green or the text itself?

Margaret
Creator II
Creator II
Author

the text itself

sunny_talwar

You can use a calculated if statement to determine the color on the Font tab.

Capture.PNG

Try this condition:

=if(Conf_Rec_Date='N', Red(), Green())

Margaret
Creator II
Creator II
Author

This is in a pivot table, so the font tab doesn't let me specify which column, or if it is supposed to when I click on that "color" box that you circled, it doesn't--its sort of greyed out. As is "font" when I click on the "+" next to the dimension.

and using

=if(Conf_Rec_Date='N', Red(), Green())


in the expression box, puts "RGB(0,128,0)" in my chart field, in black text, when what I want is a green "Y"

sunny_talwar

Oh I see, is this for a dimension or expression?

For dimension:

Capture.PNG

For expression:

Capture.PNG

Try using the same expression as above

Margaret
Creator II
Creator II
Author

Oh, for goodness' sake...

I always thought since those options are greyed out that means they aren't available but this time I actually tried clicking on it and it worked! Thank you!  I hope somebody plans on making that act more intuitively...

sunny_talwar

Hahahahaha