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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
Anonymous
Not applicable

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
Anonymous
Not applicable

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])

Share with Power BI Enthusiasts: 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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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 community update carousel

Fabric Community Update - June 2025

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