Forum Discussion
dupreem
5 years agoFrequent Visitor
Headcount Over Time From Transactional Data
Hello, I am working on building Turnover functionality and need to know headcount at a certain point in time. The transactional data I am using looks something like this: Employee ID ...
- 5 years ago
dupreem -
Measure 14 = VAR __Date = MAX([Event Date ]) VAR __Active = DISTINCT(SELECTCOLUMNS(FILTER(ALL('Table (14)'),[Event Date ]<=__Date && [Status]="Active"),"ID",[Employee ID ])) VAR __Term = DISTINCT(SELECTCOLUMNS(FILTER(ALL('Table (14)'),[Event Date ]<=__Date && ([Status]="Terminated" || [Status]="Retiree" || [Status]="Dead")),"ID",[Employee ID ])) RETURN COUNTROWS(EXCEPT(__Active, __Term))
Greg_Deckler
5 years agoCommunity Champion
dupreem -
Measure 14 =
VAR __Date = MAX([Event Date ])
VAR __Active = DISTINCT(SELECTCOLUMNS(FILTER(ALL('Table (14)'),[Event Date ]<=__Date && [Status]="Active"),"ID",[Employee ID ]))
VAR __Term = DISTINCT(SELECTCOLUMNS(FILTER(ALL('Table (14)'),[Event Date ]<=__Date && ([Status]="Terminated" || [Status]="Retiree" || [Status]="Dead")),"ID",[Employee ID ]))
RETURN
COUNTROWS(EXCEPT(__Active, __Term))dupreem
5 years agoFrequent Visitor
Greg_Deckler You rock! Thank you so much!