Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlik sense Expression on Condition (KPI)

Hi,

I am unable to write Expression for my condition.

My condition is as below :

I have table as :

Name   Value

A23
B30
C45
D55
E15

I want expression like : If value is greater than average value ,then it should be red else green

I am trying like   if(sum(value) > AVG(value) ,Red(),Green())

it is showing all green

and when i tried this : if(sum(value) > 33 ,Red(),Green())   it is giving proper output as C and D red

I want dynamically

Please help

2 Replies
bhargav_bhat
Creator II
Creator II

Hi Pankaj,

Try the below expression  see if it works

if(sum(value) > avg({1} value) ,Red(),Green())



Regards,

Bhargav


Not applicable
Author

Thanks  ,

But i achieved it using - if(avg(value) > avg(Total aggr(avg(value), name)), Red(), Green())

Thanks & Regards,

Pankaj Bhalekar