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
POSPOS
Post Patron
Post Patron

How to create a summary table with dynamic fields

Hi All,

I have three tables (Master, Source 1, Source 2).

Based on the tables, my requriement is to create a summary table:

Sample file -Download

Master Table:

DeptSalesEmp IDDiv
Dept A500Emp1Div 1
Dept A620Emp2Div 2
Dept A800Emp3Div 3
Dept B700Emp4Div 1
Dept B560Emp5Div 11
Dept C800Emp6Div 5

Source 1:

DeptDivSalesEmp
Dept ADiv 1700Emp1
Dept ADiv 2700Emp2
Dept ADiv 3900Emp3
Dept ADiv 5205Emp4
Dept ADiv 11650Emp5
Dept BDiv 1900Emp6
Dept BDiv 11600Emp7
Dept BDiv 2200Emp8
Dept CDiv 5900Emp9

 

Source 2:

DeptDivSalesEmp
Dept ADiv 1500Emp1
Dept ADiv 2700Emp2
Dept ADiv 3900Emp3
Dept ADiv 2620Emp4
Dept ADiv 11800Emp5
Dept BDiv 1700Emp6
Dept BDiv 11900Emp7
Dept CDiv 5800Emp8
Dept EDiv 3500Emp9

 

Requirement

1) Requirement is to create a summary table with all the data from the three tables.

 

Dept = Union of all values from Master, Source 1, Source 2 tables

Div =  Union of all values from Master, Source 1, Source 2 tables

Sales 1=  Sales value from Master Table

Sale 2 = Sale 2 from Source 1 minus Sales value from Master Table

Sale 3 = Sale 3 from Source 2 minus Sales value from Master Table

 

Note: There are around 20 columns in the actual report. Based on the Dept and Div , other fields eg: emp should be filtered and populated Sale 1, Sale 2, Sale 3  with the same criteria.

 

Can someone please suggest on how to achieve this?

Thank you

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Create a Many to One relationship from the Emp columns of the 2 source tables to the Emp column of the Master table.  Create a 4th table with unique values of all Dept's.  Create a Many to One relationship from the Dept column of the Master table to this 4th table.  To your visual, drag Emp from the Master table and Dept from the 4th table. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur  - Emp columns cannot be joined as there is an existing join between Depts/Div. Sample pbix is avaialble in the post.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

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.