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

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Aspiring_Developer
Specialist
Specialist

Color condition in qliksense table

Hello Everyone,

I am using below formulae in my calculation :-

if(GetSelectedCount([User.Divison Name])>0,((Sum({<INPUT_DATE = {">=$(=Date(MonthStart(Max([INPUT_DATE]))))<=$(=Date(Max([INPUT_DATE])))"}>} NB_HOURS)

/

(only({<INPUT_DATE = {">=$(=Date(MonthStart(Max([INPUT_DATE]))))<=$(=Date(Max([INPUT_DATE])))"}>}Real_ActualDays)*8)) /count([Person Name])),

if(
GetSelectedCount([User.Department Name])>0,(Sum({<INPUT_DATE = {">=$(=Date(MonthStart(Max([INPUT_DATE]))))<=$(=Date(Max([INPUT_DATE])))"}>} NB_HOURS)

/

(only({<INPUT_DATE = {">=$(=Date(MonthStart(Max([INPUT_DATE]))))<=$(=Date(Max([INPUT_DATE])))"}>}Real_ActualDays)*8)),


(Sum({<INPUT_DATE = {">=$(=Date(MonthStart(Max([INPUT_DATE]))))<=$(=Date(Max([INPUT_DATE])))"}>} NB_HOURS)

/

(only({<INPUT_DATE = {">=$(=Date(MonthStart(Max([INPUT_DATE]))))<=$(=Date(Max([INPUT_DATE])))"}>}Real_ActualDays)*8))/count(distinct [User.Department Name])


)) // & '%'

 

Aspiring_Developer_0-1632388551127.png

Now inside the selection, i want to add colors on the basis of condition in %input completion column.

If % input completion >=100, green(), red().

I am unable to implement this condition inside this expression. The way to do it is add the color expression in background color option , however, i am unable to do it.

 

Can anyone please help ?

Thanks in advance

 

2 Replies
stevejoyce
Specialist II
Specialist II

if( [%Input Completion] >=1, green(), red() )

 

where [%Input Completion] is the label of your measure.

100 % -> 1 in the condition

Aspiring_Developer
Specialist
Specialist
Author

Hello @stevejoyce 

 

I tried , it says 'error is expression'

Aspiring_Developer_0-1632402933789.png

 

Thanks