Calculating average Headcount using beginning and ending headcount

Viewed 26

I have the following dataset with Fiscal month ID and ending HC. Ending HC is in Table 1 and Fiscal Month ID is in Table 2, How can I calculate average headcount in a dax measure using the previous month ending headcount as the beginning headcount and have this apply when multiple months are selected.

For example when Month 2 is selected average HC is the average of fiscal ID 31 and 32 , When Month 2 and 3 is selected average HC is the average of of fiscal ID 31, 32, 32 and 33 When Month 2, Month 4 and Month 5 is selected average of fiscal ID 31,32,33,34,34 and 35

https://i.stack.imgur.com/vmula.png

0 Answers
Related