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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
POSPOS
Post Partisan
Post Partisan

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.