Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anoop91
Contributor III
Contributor III

KPI Values Conditional Colouring

Hello Guys ,

 

I have  a few box which shows KPI's like Inventory for example . Is there a way to add conditional covering for this KPI in such a way that the data compares itself with the previous dates value ? For example below is the Data set 

Part Number Total InventoryRun Date
K5009OIP35$02/01/2020
LOPI098792$02/01/2020
JIK92121102$02/09/2020
FIP01239129120$02/09/2020

 

The KPI for the latest run date is 222$ and it is an increase over the previous weeks Total Inventory of 127$ . How do I write a conditional formula to show this as Red with an upward arrow indicating an increase ? 🙂  Below is the formula Im using for the KPI ,

sum({$<[Run Date]={'$(=max([Run Date]))'}>} [Total Inventory $])

 

Labels (3)
1 Solution

Accepted Solutions
Prashant_Naik
Partner - Creator II
Partner - Creator II

Hi Anoop,

This might help you

Write expression for the measure in KPI, and in properties panel of KPI goto the Appearance section and open color tab.

In that on the conditional coloring option and off the library option.

and click on add limit and in that write the expression for the previous day / week

//For previous day

=Sum({<Date={"$(=Max(Date)-1)"}>}Measure)

//For Previous week

=Sum({<WeekName={"$(=Max(WeekName)-1)"}>}Measure)

Note : Please the Date format of the field and provide that in expression to evaluate the expression correctly using Date/Date# function

and Once done you can color the condition like shown in image

 

Regards,

Prashant

View solution in original post

3 Replies
Prashant_Naik
Partner - Creator II
Partner - Creator II

Hi Anoop,

This might help you

Write expression for the measure in KPI, and in properties panel of KPI goto the Appearance section and open color tab.

In that on the conditional coloring option and off the library option.

and click on add limit and in that write the expression for the previous day / week

//For previous day

=Sum({<Date={"$(=Max(Date)-1)"}>}Measure)

//For Previous week

=Sum({<WeekName={"$(=Max(WeekName)-1)"}>}Measure)

Note : Please the Date format of the field and provide that in expression to evaluate the expression correctly using Date/Date# function

and Once done you can color the condition like shown in image

 

Regards,

Prashant

Anoop91
Contributor III
Contributor III
Author

Thank you so much Prashant!

Prashant_Naik
Partner - Creator II
Partner - Creator II

Happy to help Anoop😊