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

Holiday Working question

I have one table in which Total holidays dates are present,

i want total working days to count which is Count(Total Days of Month) - Count(Holidays)

getting some glitch in output pls suggest.

pls find the attached sample data for holidays

31 Replies
MK_QSL
MVP
MVP

I want to understand what result you are looking for?

Don't want so many replies for a simple question...

abhaysingh
Specialist II
Specialist II
Author

Pls find the attachment of sample working and output expected

abhaysingh
Specialist II
Specialist II
Author

hi Deepak,

i have holidays including Sunday and Holidays. only require to do let say jan has 31 days and holidays are 7 in any plant

so in that plant ouput expexted is 31-7 = 24

hope i m clr now

asgardd2
Creator III
Creator III

I hope, this solution is correct.

Application in attachment.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try this expression

=MonthEnd(Min({< Flag = {'Calendar'}>} [Calendar Date])) - MonthStart(Min({< Flag = {'Calendar'}>} [Calendar Date]))

For Total Month Days

Hope this helps you.

Regards,

jagan.

abhaysingh
Specialist II
Specialist II
Author

HI Jagan,

if i am in feb now and till now only 11 total days are there and one holiday is applicable, so for that output shud come 10

but i am getting 29(total days on feb)- 4(total holidays of feb). how to include this?

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=If(MonthName(Min({< Flag = {'Calendar'}>} [Calendar Date])) <> MonthName(Today()), 

  MonthEnd(Min({< Flag = {'Calendar'}>} [Calendar Date])),

  Min({< Flag = {'Calendar'}>} [Calendar Date]))

-

MonthStart(Min({< Flag = {'Calendar'}>} [Calendar Date]))

abhaysingh
Specialist II
Specialist II
Author

thanks for revert, but its

giving me wrong output, till now feb has 11 days and there is 1 leave so it shud give 10 working days, it is giving me 6.

and one more thing want to add, i am looking all this as per fiscal year

abhaysingh
Specialist II
Specialist II
Author

thanks for ur help,but seems not fulfill

In Jan there are 31 days and in ur code its 30 and if i m in feb, than it is taking full Month days i.e 29 but currently in feb there are 11 days, so before 11 days only one holiday than count shud be 11-1= 10.

pls suggest

jagan
Luminary Alumni
Luminary Alumni

HI,

Try like this

=If(MonthStart(Min({< Flag = {'Calendar'}>} [Calendar Date])) >=  MonthStart(Today()), Today() + 1,

MonthEnd(Min({< Flag = {'Calendar'}>} [Calendar Date])))

-

MonthStart(Min({< Flag = {'Calendar'}>} [Calendar Date]))

Regards,

Jagan.