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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
kakani87
Specialist
Specialist

Issue with Days displaying

Dear All,

Kind Request to help me out of this issue.

I'm having a data of bio metric access from month of november to jan 1st but my requirement is to display attendance using smiley's in a chart and consider sunday as holiday using a flag sunday flag in calendar

like green as present and red as absent for max date.

                Days 1 | 2 | 3| 4 | ...............   

Dept | Emp | | | | ...

for day attendance as on max date like today.

Following is the expression I'm using to acheive the above requirement.

if

(

Count

(

DISTINCT

{<

InOut={0},

CalendarFinancialYear={'$(=Maxstring(CalendarFinancialYear))'},

CalendarMonthAndYear={'$(=maxstring(CalendarMonthAndYear))'}

>}

EmpID

)=1

,

'qmem://<bundled>/BuiltIn/smiley1_g.png'

,

if

(

max(SundayFlag)=1

,

'qmem://<bundled>/BuiltIn/smiley1.png'

,

'qmem://<bundled>/BuiltIn/smiley3_r.png'

)

)

1 Solution

Accepted Solutions
sunny_talwar

Just changed the order of the if statement....

If(Max(TOTAL <CalendarDayOfMonth>{<CalendarFinancialYear={'$(=Maxstring(CalendarFinancialYear))'}, CalendarMonthAndYear={'$(=maxstring(CalendarMonthAndYear))'}>}SundayFlag) = 1, 'qmem://<bundled>/BuiltIn/smiley1.png',

If(Count(DISTINCT {<InOut={0}, CalendarFinancialYear={'$(=Maxstring(CalendarFinancialYear))'}, CalendarMonthAndYear={'$(=maxstring(CalendarMonthAndYear))'}>} EmpID) = 1, 'qmem://<bundled>/BuiltIn/smiley1_g.png',

If(If(Only(TOTAL <CalendarFinancialYear> CalendarFinancialYear) = MaxString(TOTAL <CalendarFinancialYear>CalendarFinancialYear) and Only(TOTAL <CalendarDayOfMonth> CalendarDayOfMonth) = MaxString({<InOut={0}, CalendarFinancialYear={'$(=Maxstring(CalendarFinancialYear))'}, CalendarMonthAndYear={'$(=maxstring(CalendarMonthAndYear))'}>}TOTAL <CalendarDayOfMonth>CalendarDayOfMonth),

Count(TOTAL <EmpID> DISTINCT {<CalendarFinancialYear, CalendarMonthAndYear>} EmpID) - Count(DISTINCT {<InOut={0}, CalendarFinancialYear={'$(=Maxstring(CalendarFinancialYear))'}, CalendarMonthAndYear={'$(=maxstring(CalendarMonthAndYear))'}>} EmpID)) > 0,

'qmem://<bundled>/BuiltIn/smiley3_r.png')))

Capture.PNG

For some reason your sample doesn't have 10-12-2017 and 24-10-2017... so that is why you don't see those in the pivot table at all... but if you add them from the back end, you should see them as grey...

View solution in original post

15 Replies
sunny_talwar

So what is wrong? Not sure I understand what is not working?

kakani87
Specialist
Specialist
Author

for latest month of data only 1st jan entries available in the application max of date if we consider this should display only jan 1st according to my requirement the current  month data to be displayed

according to this jan is max month and with in that only jan 1st is avail rite inspite of this it is displaying all days

.

and one more thing i need is grren as present and red as absent and some other colour as Sunday holiday for all should be shown 

sunny_talwar

Is this looking right?

Capture.PNG

If(Count(DISTINCT {<InOut={0}, CalendarFinancialYear={'$(=Maxstring(CalendarFinancialYear))'}, CalendarMonthAndYear={'$(=maxstring(CalendarMonthAndYear))'}>} EmpID) = 1, 'qmem://<bundled>/BuiltIn/smiley1_g.png',

If(Max({<InOut={0}, CalendarFinancialYear={'$(=Maxstring(CalendarFinancialYear))'}, CalendarMonthAndYear={'$(=maxstring(CalendarMonthAndYear))'}>}SundayFlag) = 1, 'qmem://<bundled>/BuiltIn/smiley1.png', 'qmem://<bundled>/BuiltIn/smiley3_r.png'))

kakani87
Specialist
Specialist
Author

Yes Sunny this is right

kakani87
Specialist
Specialist
Author

Sunny this is displaying only present in green smiley but suppose to display max month all days of an employee status green as present ,Red as absent and some other colour like grey to be indicated as sunday.

For now in application i'm having only jan 1st date for max month on that particular jan 1st couple of people they are absent this suppose to be indicate red.

kakani87
Specialist
Specialist
Author

Hi Sunny,

Extended to  the earlier discussion what we had in showing green smiley for present , red for absent the But the list of absent it is not showing the people who are absent and they suppose to be in red this is not displayed there. for the month of december if we filter then will come to know because all days displayed with in that if we can show show sunday flag on sunday as some other colour this will be helpful for me as per the requirement. 

Could you kindly check with that once. 

Regards,

Sai

kakani87
Specialist
Specialist
Author

Hi Sunny,

Extended to  the earlier discussion what we had in showing green smiley for present , red for absent the But the list of absent it is not showing the people who are absent and they suppose to be in red this is not displayed there. for the month of december if we filter then will come to know because all days displayed with in that if we can show show sunday flag on sunday as some other colour this will be helpful for me as per the requirement. 

Could you kindly check with that once. 

Regards,

Sai

kakani87
Specialist
Specialist
Author

Hi Sunny,

Extended to  the earlier discussion what we had in showing green smiley for present , red for absent the But the list of absent it is not showing the people who are absent and they suppose to be in red this is not displayed there. for the month of december if we filter then will come to know because all days displayed with in that if we can show show sunday flag on sunday as some other colour this will be helpful for me as per the requirement. 

Could you kindly check with that once. 

Regards,

Sai

kakani87
Specialist
Specialist
Author

Hi Sunny,

Extended to  the earlier discussion what we had in showing green smiley for present , red for absent the But the list of absent it is not showing the people who are absent and they suppose to be in red this is not displayed there. for the month of december if we filter then will come to know because all days displayed with in that if we can show show sunday flag on sunday as some other colour this will be helpful for me as per the requirement. 

Could you kindly check with that once. 

Regards,

Sai