Forum Discussion
Terminations
- 8 years ago
Thanks for the responses. I create the snapshot date by each time I save a file for the month in a folder, I create that column based on those fields. What I didn't do was change the format to date, so while there was no syntax issues, I couldn't get anything to accurately calculate. I changed the format to date, and it seems to work fine now. S
Hi mikeborg82,
Could you try the formula below to see if it works in your scenario? :smileyhappy:
Avg YTD hc =
CALCULATE (
CALCULATE (
COUNT ( 'Workforce Snapshots'[Employee Number] ),
DISTINCT ( 'Workforce Snapshots'[Source.Name] )
)
/ DISTINCTCOUNT ( 'Workforce Snapshots'[Source.Name] ),
FILTER (
ALL ( 'Workforce Snapshots' ),
'Workforce Snapshots'[Snapshot Date]
<= MAX ( 'Workforce Snapshots'[Snapshot Date] )
&& YEAR ( 'Workforce Snapshots'[Snapshot Date] )
= YEAR ( MAX ( 'Workforce Snapshots'[Snapshot Date] ) )
)
)
Regards
Thanks for the responses. I create the snapshot date by each time I save a file for the month in a folder, I create that column based on those fields. What I didn't do was change the format to date, so while there was no syntax issues, I couldn't get anything to accurately calculate. I changed the format to date, and it seems to work fine now. S
- v-ljerr-msft8 years agoMicrosoft Employee
Hi mikeborg82,
Great to hear the problem got resolved! Could you accept your reply above as solution to close this thread? :smileyhappy:
Regards