Forum Discussion
Anonymous
6 years agoNot applicable
Help With Missing Timesheet Counts
Hello everyone, I need some help with a Missing Timesheet report that I'm doing for my company. Basically, I have 2 tables that have a 1-to-many relationship: Employee List - table of employee ...
- Anonymous6 years ago
Hi Anonymous ,
Please update the formula of measure "Missing count" as below:
Missing Count = VAR _selections = ALLSELECTED ( 'Timesheet Hours'[Period Name] ) VAR _countofPeriod = COUNTROWS ( _selections ) RETURN CALCULATE ( DISTINCTCOUNT ( 'Employee List'[Employee Name] ), 'Employee List'[Timesheet Required] = "Yes" ) * _countofPeriod - CALCULATE ( COUNT ( 'Timesheet Hours'[Period Name] ), 'Employee List'[Timesheet Required] = "Yes", FILTER ( ALL ( 'Timesheet Hours' ), 'Timesheet Hours'[Period Name] IN _selections ) )Best Regards
Rena
Anonymous
6 years agoNot applicable
Anonymous Yes, here is the link to the file. I haven't done this on here before, so let me know if you have any issues getting it.
Anonymous
6 years agoNot applicable
Hi Anonymous ,
Please update the formula of measure "Missing count" as below:
Missing Count =
VAR _selections =
ALLSELECTED ( 'Timesheet Hours'[Period Name] )
VAR _countofPeriod =
COUNTROWS ( _selections )
RETURN
CALCULATE (
DISTINCTCOUNT ( 'Employee List'[Employee Name] ),
'Employee List'[Timesheet Required] = "Yes"
) * _countofPeriod
- CALCULATE (
COUNT ( 'Timesheet Hours'[Period Name] ),
'Employee List'[Timesheet Required] = "Yes",
FILTER (
ALL ( 'Timesheet Hours' ),
'Timesheet Hours'[Period Name] IN _selections
)
)
Best Regards
Rena
- Anonymous6 years agoNot applicable
Anonymous Oh my goodness, thank you so much!!! That worked wonderfully! Looks like I need to learn more about VAR because that has been appearing a lot. Thanks again, I realy really appreciate your help!