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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
vadepu
Frequent Visitor

Add two columns values from different tables

Hi , 

 

Need help !!

 

I have below tables

Table 1:

vadepu_0-1625627622643.png

 

Table 2:

vadepu_1-1625627651658.png

 

Table 3:

vadepu_2-1625627689372.png

 

Note: Score column is based on some condition pn Age column in all the tables.

Example:

score = IF((Table1[Age])<>0,IF((table1[Age])>45,100+(Table1[Age])/10,0),50)
 
i want sum all the score columns and result should be as below.
 
vadepu_3-1625628045290.png

 

Thanks

 

 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @vadepu ,

Here are the steps you can follow:

1. Create calculated table.

calculatedtable1 =
var _1=SUMMARIZE('Table1',[Brand],"Score",MIN('Table1'[Score]))
var _2=SUMMARIZE('Table2',[Brand],"Score",MIN('Table2'[Score]))
var _3=SUMMARIZE('Table3',[Brand],"Score",MIN('Table3'[Score]))
var _union=UNION(_1,_2,_3)
return
_union
calculatedtable2 =
SUMMARIZE('calculatedtable1',[Brand],"Score",SUM('calculatedtable1'[Score]))

2. Create calculated column.

Car = RANKX('calculatedtable2','calculatedtable2'[Brand],,ASC)

3. Result:

vyangliumsft_0-1625810175703.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

4 REPLIES 4
v-yangliu-msft
Community Support
Community Support

Hi  @vadepu ,

Here are the steps you can follow:

1. Create calculated table.

calculatedtable1 =
var _1=SUMMARIZE('Table1',[Brand],"Score",MIN('Table1'[Score]))
var _2=SUMMARIZE('Table2',[Brand],"Score",MIN('Table2'[Score]))
var _3=SUMMARIZE('Table3',[Brand],"Score",MIN('Table3'[Score]))
var _union=UNION(_1,_2,_3)
return
_union
calculatedtable2 =
SUMMARIZE('calculatedtable1',[Brand],"Score",SUM('calculatedtable1'[Score]))

2. Create calculated column.

Car = RANKX('calculatedtable2','calculatedtable2'[Brand],,ASC)

3. Result:

vyangliumsft_0-1625810175703.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

amitchandak
Super User
Super User

@vadepu , based on what I got

A new column in table A

 

new column = maxx(filter(Table3, Table1[Brand] = Table1[Brand]), Table3[Score]) + maxx(filter(Table2, Table1[Brand] = Table1[Brand]), Table2[Score])
+ Minx(filter(Table1, Table1[Brand] = earlier(Table1[Brand])), Table1[Score])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak , thank you for your reply... i just want to add score columns of all the three tables and show in the table view just car and total score

@vadepu , While the above should help as a new column in tbale one. With common dimension brand

 

you should able to get like

Sum(Table1[Score]) + sum(Table2[Score]) + sum(Table3[Score])

 

or

Minx(filter(allselected(Table1), Table1[Brand] = Max(Table1[Brand])), Table1[Score]) +  sum(Table2[Score]) + sum(Table3[Score])

 

Display with common brand and Car from Table 1

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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