Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Allocate costs on a monthly basis

Hi all,

 

I tried looking for an answer myself (or here), but I just can't get it to work.

Hopefully the answer is understandeable for a non-IT guy (finance background)... 🙂

 

So the problem: 

 

We have about 100 employees working on our payroll and we want to allocate their individual cost to 4 different business units.

It's possible that person A works from januari - march on business unit 1 and from then on business unit 2.

 

So basically, we have 1 large table as follows:

Capture.PNG

 

We are updating this table as soon as there is a change in the budget/forecast where this person will work.

I already unpivoted that table to the format below:

 

Capture4.PNG


Next to that, I have a datatable with the same employee numbers and their cost per month (below dummy values).

 

Capture3.PNG

 

So the end result would have to be that I know, for each business unit, what my payroll cost was in each month.

Every month, the new actual payroll cost will be added to the model.

 

In the above example, the cost of employee 145 should be added in business unit TNT in January and as of February it should be allocated to FTTX. 

 

I hope my problem makes sense?
What is the best practice to solve this, as I don't believe I'm the only one with this request...

Thanks a lot for helping me out!

 

3 REPLIES 3
Greg_Deckler
Super User
Super User

You are going to want to unpivot your month columns and then it should be fairly straight-forward.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Please enlighten me 🙂
Anonymous
Not applicable

Thanks for the reply!

However, it's not really clear how it should be straightforward then...
Could you please provide me with a bit more info? Thanks!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors