I was trying to solve an issue in PowerBI, which I thought, should be an easy task. Unfortunately it isn´t - at least - not for me. After trying several approaches without any noticeable progress, I wanted to ask for your support, before it drives me crazy
Here is the scenario:
We have several Cost Centers in different locations.
Each Cost Center has a Cost Center Lead and some Users
Each employee (Lead and Users) have a defined Start and End Date
Employees can change Cost Centers and/or become Cost Center Leads
Cost Center Leads can change Cost Centers as well
Now we simply wanted to know, how many employees we had at a certain time in each Cost Center, and which employee was the lead at that time.
This should be charted as number of employees, by Cost Center and Lead over time.
Please find a simple dataset in the attached file.
Thanks in advance for your support and looking forward to hearing from you, how this problem can be solved.
thanks for the quick and effective feedback, which quickly solves one of the problems.
Upon applying your formula, the chart updated correctly. However the table and the card in the attached example are showing wrong results.
Also I need a distinct value for a given date, as I have to do some calculations on the headcount.
The User should be able to select a month and year, and the resulting headcount at this time should be displayed and be useable for further calculations.
Looking forward to another great feedback.
Best regards
Frank
Thanks again for the incredible feedback. Seems you never sleep
Think I have to ponder about the formula for quite a while, to understand what´s going on. The Current Stuff card is showing the correct result
Beside this, a have a question: Why is the table not filtered to the report date and what is the connection between the Report Date Card and the slicer, as they show different dates?
Many thanks for all the answers and help that you are providing.
I was able to apply the measures correctly and I have the correct Staff headcount per period.
However, in my model I would like to calculate the Yearly average.
I have tried several ways without any success.
If you can help that would be amazing.
PS: I’m not attaching a model, because it would be the same as Sam is using.