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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Philipp_ISARTAX
Frequent Visitor

Show Sales amount employee-wise according to allocated costs

Hello,

 

I try to find a solution for the following setup. I tried several DAX-Formulas, Modelling and so on. But I didn't find a solution.

 

Basis is one Table with all Sales:

Invoice DateInvoice No.Order IDProduct No.Sales amount
05.12.2022202201522433500,00
05.12.2022202201647833450,00
05.12.2022202202522424250,00
09.12.2022202203522435800,00
13.11.2023202306823633350,00
13.11.2023202306823633400,00
13.11.2023202307647824300,00
15.12.2023202311823635325,00
15.12.2023202311647824250,00
15.12.2023202311823635125,00

 

A second table shows all Costs occured on each Order (Employeewise):

Order IDEmployee No.Employee NameWorking DateCost
52241Max02.06.202255,00
64782Thomas08.04.202280,00
82364Susan08.08.202320,00
52243Lisa01.12.202345,00
64785Marcus02.08.202290,00
64782Thomas15.07.202278,00
52244Susan07.11.202265,00
64783Lisa09.04.202353,00
82361Max08.12.202374,00
52242Thomas21.12.202298,00
64784Susan02.06.202255,00
64783Lisa08.04.202280,00
52245Marcus08.08.202320,00
64782Thomas01.12.202345,00
82364Susan02.08.202290,00
52243Lisa15.07.202278,00
64781Max07.11.202265,00
64782Thomas09.04.202353,00
52244Susan08.12.202374,00
64783Lisa21.12.202298,00
82365Marcus02.06.202245,00
52242Thomas08.04.202290,00
64784Susan08.08.202378,00
64783Lisa01.12.202365,00

 

 

Additionally I created two Dimension Tables (Employees and Orders) which were linked as follows:

Philipp_ISARTAX_0-1708175476385.png

 

I would like to get a report which gives me the Sales amount per employee (the sales amount should be split up according to the costs occured on the project). 

So far I'm able to add a column in the Cost Table which calculates the relevant sales amount.

But my big challenge is, that I also would like to sort the divided employeewise sales amount by invoice date. 

Target is a visual which shows the sales amount on the X-Achsis and the Invoice-Date on the Y-Achsis. And this amount should be able to be filtered by employee.

 

I'm really getting crazy because I tried several solutions. But nothing worked sufficient. I hope somebody can help me.

 

Kind regards,

Philipp

2 REPLIES 2
Anonymous
Not applicable

Hi @Philipp_ISARTAX ,

What's your expected result? Could you please provide some examples and explain the expected result base on the provided sample data? For example: OrderID 5224,  the expected values is 155000?

vyiruanmsft_0-1708592898043.png

Best Regards

Hi @Anonymous ,

Thanks for your reply. Your solution was not the expected value. 

I wanted to split up the sales volume of an Order (e.g. Order 5224; 1,550.00 € total sales) to the employees who worked on the order. The split up should be based on the allocated costs (total costs for Order 5224 = 525.00 €. 

 

In a first step this seemed easy to realize as additional columns in the table "All costs". Following sample filtered by order 5224:

Philipp_ISARTAX_0-1708693675533.png

But if I now want to visualize the sales per employee in a visual I'm not able to show the allocated sales in relation to the invoice date (e.g. line graph showing development of sales over the year).

 

Therefore I thought about a solution starting with table "Sales".

At the end I would have loved to use a measure for this without adding additinal columns.

 

However in the meantime I found a solution. It is not my prefered solution but it works:

 

I dublicated the table sales. The new table was named sales_splitup. I added the table Dim-Employees as column to table "Sales_splitup". Than I expanded the additional table within the added column. 

This resulted in a "Sales_splitup"-table with 5 times more lines. Each Sales Line was 5-times multiplied for each employee.

This made it possible to calculate the sales-split employee-wise in the sales_splitup table.

 

Find the screenshots of my doing as follows:

Philipp_ISARTAX_5-1708695138795.png

 

Philipp_ISARTAX_1-1708694611569.png

 

Philipp_ISARTAX_2-1708694659460.png

 

Philipp_ISARTAX_3-1708694739926.png

 

Philipp_ISARTAX_1-1708698732646.png

 

 

Philipp_ISARTAX_4-1708694822192.png

 

Philipp_ISARTAX_7-1708695530414.png

Philipp_ISARTAX_8-1708695641219.png

 

Philipp_ISARTAX_9-1708695824705.png

 

And at last the result:

Philipp_ISARTAX_10-1708696293783.png

This made me able to create following visual:

Philipp_ISARTAX_0-1708698703112.png

 

 

 

At the end this helped me for my solution, but it blew up the volume of the sales table. In the real data I now have two sales tables. The one which is employee-wise has 1.2 Mio. lines (caused by the multiple with 20 employees).

If you have an Idea how this can be solved with a measure I would be thankful.

Best regards


 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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