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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
ddalton
Resolver I
Resolver I

Create new table column summing data from multiple tables

Hi,

 

I want to sum values by unique ID, and then add another value from a different table to those sums (based on the same unique ID) to create a new column in a table or create a new measure. 

 

I'm not sure if it's possible to append queries to create a new table or if the better solution is DAX but, frankly, I'm new to both approaches so I'm not sure what options are available or which is the most elegant solution. 

 

Below are some tables representative of the scenario. The data is imported into the dataset. 

 

Table 1. 

IDREFValueA
2525551000
2615601500
3005621350
3245782000
.........
.........

 

Table 2.

IndexIDValueB
1252100
2252150
3261500
4300100
5324150
6324150
.........
.........

 

Effectively, I want to:

  1.  By unique ID, sum ValueB values to create ValueC
  2. Add ValueC to ValueA to create NewValue

The objective is to create a new Field in Table 1 called NewValue such that Table 1 would look like:

 

Table 1. 

IDREFValueANewValue
25255510001250
26156015002000
30056213501450
32457820002300
......... 
......... 

 

 

 

 

 

1 ACCEPTED SOLUTION
ddalton
Resolver I
Resolver I

Just now, I've tried:

 

Table = SUMMARIZE(Table2,Table2[ID],"ValueC",SUM(Table2[ValueB]),"ValueA",SUMMARIZE(Table1,Table1[ValueA]))

 

To create a new table, and then simple added a column in the table by adding the two columns together. 

 

The added NewValue can then be referenced elsewhere.

View solution in original post

1 REPLY 1
ddalton
Resolver I
Resolver I

Just now, I've tried:

 

Table = SUMMARIZE(Table2,Table2[ID],"ValueC",SUM(Table2[ValueB]),"ValueA",SUMMARIZE(Table1,Table1[ValueA]))

 

To create a new table, and then simple added a column in the table by adding the two columns together. 

 

The added NewValue can then be referenced elsewhere.

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.