Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
JesseDK
Contributor
Contributor

Conditional Coloring with Variables

I am working on conditional color formatting a KPI with a percentage value. I can easily create the upper and lower limits using if statements within that single KPI. However, I have several KPIs that will have the same conditions and I am looking for a more efficient solution. I am attempting to create variables that return the shifting limits determined by the quarter and then using the variable in the individual KPIs instead of copying complex formulas to each KPI 4 times over. Anyone have any ideas on how to do this? I can take the same formula that works in the individual KPI, paste it in the variable, and then point the conditional formula at the variable but it doesn't seem to work that way. Alternatively, is there a way to copy the KPI that has condition colors, paste it, and swap out the KPI value without dropping the conditional formatting?
1 Solution

Accepted Solutions
JesseDK
Contributor
Contributor
Author

Thanks. It looks like I was missing the '$' sign when referencing the variable. Everything is working as expected and I now have 4 central variables to edit for limit changes instead of nearly 100 KPIs. 

View solution in original post

2 Replies
Or
MVP
MVP

You should be able to do this using a variable. You may need to use a specific form of dollar sign expansion to make it work, depending on what exactly your variable would contain.

Have a look at:

https://community.qlik.com/t5/Qlik-Design-Blog/The-Magic-of-Variables/ba-p/1465499

https://community.qlik.com/t5/Qlik-Design-Blog/The-Magic-of-Dollar-Expansions/ba-p/1471979

Or, if you can't work it out using those resources, you could post your specific requirement (ideally with a sample app) to allow further assistance.

JesseDK
Contributor
Contributor
Author

Thanks. It looks like I was missing the '$' sign when referencing the variable. Everything is working as expected and I now have 4 central variables to edit for limit changes instead of nearly 100 KPIs.