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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Mr_C
Regular Visitor

Error in sum values of 2 tables that must be filtered

Hi,

 

I have two tables, one with sales and all the related columns with sales definitions and other table with expenses for each comercial.

 

I want to sum the sales margin and deduct the expenses per comercial, keeping the visual ou page filters in table one as It must be analyzed not only by salesman, but also by the warehouse unit where the comercial is based, by business, by date and sales types (sales with or without comissions), other...

Table sales and table expenses are linked through a concanetad column year,month,day,salesman - all present in expenses table and unique

Below a small example of it:

Table one (sales) (we have more than 50 salesman that make at least 10 sales per day, therefore the salestable is huge...)
Warehouse unit | salesman | year | month | day | margin | type of sale | order or sale  | ......
Unit 1                | 001          |2024 | 01        |25   | 100       | goods         | Sale                 |....
Unit 2                | 95            | 2024 | 01       |20    | 50       | goods         | Sale                 |....
Unit 1                | 005          |2024 | 02        |5   | 100       | goods         |order                |....
Unit 1                | 001          |2024 | 01        |25   | 100       | goods         |order                |....
Unit 2               | 95            | 2024 | 01       |20    | 150       | comission        | Sale                 |....


 

I have two tables, one with sales and all the related columns with sales definitions and other table with expenses for each comercial.

 

I want to sum the sales margin and deduct the expenses per comercial, keeping the visual ou page filters in table one as It must be analyzed not only by salesman, but also by the warehouse unit where the comercial is based, by business, by date and sales types (sales with or without comissions), other...

Table sales and table expenses are linked through a concanetad column year,month,day,salesman - all present in expenses table and unique

Below a small example of it:

Table two (expenses)
 salesman | year | month | day | 
001          |2024 | 01        |5   | 10
95            | 2024 | 01       |20    | 5
005          |2024 | 02        |5   | 15     
 001          |2024 | 01        |20  | 10
 95            | 2024 | 01       |12   | 100   

Please help 

1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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