Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

Dynamic Color Condition in KPI/Text object

Hi Everyone,

Can any one please help me on this on Qliksense.


In a KPI I have the results From my measure like R,G.

When the result is G i need to show the text in Green color

when the result is R i need to show the text in Red color.

I have used this expression in the KPI measure but not working in Text object getting RGB Code as result.

if((only({<Monthyear={'=$(=Max(MonthYear)'},ID={1}>}[RAG status])='G',RGB(0,153,0),

if((only({<Monthyear={'=$(=Max(MonthYear)'},ID={1}>}[RAG status])='R',RGB(153,0,0)))

is there any way to show this in KPI/TEXT object with colored text as per the expression code change.

Thanks in advance.

1 Solution

Accepted Solutions
MK9885
Master II
Master II

Unfortunately the color by expression is not supported by Default Text box.

You may have to use extension for that

Check the correct answer in below link..

Custom Color in Text Object - Qlik Sense

Use below expression in the extension

=if(only({<Monthyear = {$(=Max(Monthyear))},ID={1}>}[RAG status])='G',RGB(0,153,0),

if(only({<Monthyear = {$(=Max(Monthyear))},ID={1}>}[RAG status])='R',RGB(153,0,0)))

I guess your expression has syntax errors.

BTW, this one is Qlik Sense question as well...

If you can move there to get more answers?

View solution in original post

4 Replies
MK9885
Master II
Master II

Unfortunately the color by expression is not supported by Default Text box.

You may have to use extension for that

Check the correct answer in below link..

Custom Color in Text Object - Qlik Sense

Use below expression in the extension

=if(only({<Monthyear = {$(=Max(Monthyear))},ID={1}>}[RAG status])='G',RGB(0,153,0),

if(only({<Monthyear = {$(=Max(Monthyear))},ID={1}>}[RAG status])='R',RGB(153,0,0)))

I guess your expression has syntax errors.

BTW, this one is Qlik Sense question as well...

If you can move there to get more answers?

vkish16161
Creator III
Creator III

Yes! It is possible.

But you have to create a master measure. In the master measure there's a color option.

This color option will persist across the app. Color_master_Item.JPG

bhavvibudagam
Creator II
Creator II
Author

Hi Vishnu,

Thanks for your reply. But its static Color option right. I am looking for dynamic color change as per the result with in KPI/Text object.

vkish16161
Creator III
Creator III

You can also make it dynamic!

Check this out:

Qlik Sense - Using the KPI Object - YouTube

Also,

conditional color qs.JPG