Forum Discussion
Add two columns values from different tables
Hi ,
Need help !!
I have below tables
Table 1:
Table 2:
Table 3:
Note: Score column is based on some condition pn Age column in all the tables.
Example:
Thanks
- Anonymous5 years ago
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 _unioncalculatedtable2 = SUMMARIZE('calculatedtable1',[Brand],"Score",SUM('calculatedtable1'[Score]))2. Create calculated column.
Car = RANKX('calculatedtable2','calculatedtable2'[Brand],,ASC)3. Result:
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
4 Replies
- amitchandakSuper 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])- vadepuFrequent Visitor
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
- amitchandakSuper User
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
- AnonymousNot 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 _unioncalculatedtable2 = SUMMARIZE('calculatedtable1',[Brand],"Score",SUM('calculatedtable1'[Score]))2. Create calculated column.
Car = RANKX('calculatedtable2','calculatedtable2'[Brand],,ASC)3. Result:
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