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

Set Analysis Sum Distinct Values

Hello,

I have a dataset which shows me how many employess were present on a specific day and  for how many workhours /weekly they are working based on their contract

I need to show the headcount for every day and the amount of hours based on their contract. (i,.e 40 per week)

So im counting every employees in the dataset which has an entrydate and multipling it with their workhours.

I can do this for a daily basis, but when i want to show it on a weekly/monthly basis the hours of the whole week are being added up.  So it shows me a headcount of 11 but instead of 440 it will show me 440 * 7 workhours.  I cant just divide by 7 because some weeks at the monthstart dont have 7 days.

Is there a way to either figure how many weekdays a specific week has, so i can just divide it by the amount of days, or any a expression  like  sum(distinct(workhours) to show this properly

Thanks

1 Solution

Accepted Solutions
Murlimes
Contributor III
Contributor III
Author

I found  a way to make this work with count(distinct(<datefield>) to figure the number of days in a specific week, so i can divive all workhours , which works fine.

 

View solution in original post

1 Reply
Murlimes
Contributor III
Contributor III
Author

I found  a way to make this work with count(distinct(<datefield>) to figure the number of days in a specific week, so i can divive all workhours , which works fine.