Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Vijen_M
Contributor III
Contributor III

Count of Dates excluding sat and sun

i have date from ist jan 2020 to 14 feb 2023 and i want to count date excluding first and second saturday of Month and all the sundays  ? please help asap 

Labels (3)
1 Solution

Accepted Solutions
ogster1974
Partner - Master II
Partner - Master II

in your master calendar add something like.

If(weekday(tmpDate)=6 or (weekday(tmpDate)=5 and day(tmpDate)<=14),1,0) as Exclude_Flag

 

View solution in original post

3 Replies
ogster1974
Partner - Master II
Partner - Master II

in your master calendar add something like.

If(weekday(tmpDate)=6 or (weekday(tmpDate)=5 and day(tmpDate)<=14),1,0) as Exclude_Flag

 

Vijen_M
Contributor III
Contributor III
Author

Hi @ogster1974  thank you for your response from this i have got the answer .

i have done this in another way please review it if it's right 

(Count({$<WeekDay={'Sat'},Day={'(<=14)'}>}Date)) + (Count({$<WeekDay={'Sun'}>}Date))

 

from this i am getting same output

ogster1974
Partner - Master II
Partner - Master II

Yes you can use set analysis to do this. The question is where do you want
the calculation processing to be done on the back end where the user won't
notice or the front end where as you scale up your user may have to wait
for it to execute.

I tend to use set analysis calculations only when the users selections make
an impact to its result.

In this case a flag set in the back end is sufficient hence my solution.