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: 
capriconuser
Creator
Creator

color on cell

i have table like this

e.g.

employeename   dates 20/3/2017  21/3/2017 22/3/2017 23/3/2017

abc employee                 5:00               5:00     5:00                    -

defemployee                        -                 5:00     5:00                    -

xyz employee                    5:00                  -       5:00                    -

now here i want to try if all employees has '-' on then want to color  beacuse on 23 suppose to be official holiday

this is i try but not works ..

=if(count({<AbsentFlag = {'Absent'}>}ZID) = $(vTotalEmp),RGB(0,0,255))

this fill cells where they found absent where as i want when all employees have absent then want to color on that specific date not all dates

1 Solution

Accepted Solutions
vishsaggi
Champion III
Champion III

Try this in your background expression like :

extending peters script

Load this.

ColorCode:
CrossTable(Date, Values, 1)
LOAD * INLINE [
employeename,20/3/2017,21/3/2017,22/3/2017,23/3/2017
abcemployee,5:00,5:00,5:00,-
defemployee,-,5:00,5:00,-
xyzemployee,5:00,-,5:00,-
]
;

Pivot table

Dim: Employeename, Date

Expr: Values

Background expr for Values like below

View solution in original post

10 Replies
capriconuser
Creator
Creator
Author

any updated please?

vishsaggi
Champion III
Champion III

Can you share your sample app where you trying this expression?

Anil_Babu_Samineni

Create one field in Script

If(Len(Measure)>0, 'Present' , 'Absent') as Color_Flag

And use this?

=if(count({<Color_Flag = {'Absent'}>} ZID) = $(vTotalEmp),RGB(0,0,255))

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
petter
Partner - Champion III
Partner - Champion III

This should work for you using a Pivot Table:

2018-04-08 10_09_53-QlikView x64 Personal Edition - [C__Users_pette_OneDrive_Documents_#QC 2018-04-0.png

2018-04-08 10_10_18-Edit Script [C__Users_pette_OneDrive_Documents_#QC 2018-04-06 Color on Cell.qvw_.png

palanimurugan
Contributor III
Contributor III

Hi..

There are 2 ways we can change the color.

        1. You can set the color using visual Cues Option. Please refer the snapshot.

         color.png

         2. Goto View---> design gord--> right click on your desired cell-->select custom format cell --->then select the color

capriconuser
Creator
Creator
Author

@petter-s yes this is i have sample data but here i only want red color on 23 .3.2017 like when all are absent then want to red else blue ... beacuse in other columns some are absent and some are present ..

vishsaggi
Champion III
Champion III

Try this in your background expression like :

extending peters script

Load this.

ColorCode:
CrossTable(Date, Values, 1)
LOAD * INLINE [
employeename,20/3/2017,21/3/2017,22/3/2017,23/3/2017
abcemployee,5:00,5:00,5:00,-
defemployee,-,5:00,5:00,-
xyzemployee,5:00,-,5:00,-
]
;

Pivot table

Dim: Employeename, Date

Expr: Values

Background expr for Values like below

capriconuser
Creator
Creator
Author

what is expression ?? if i am not wrong i did not see any expression

capriconuser
Creator
Creator
Author

any update