cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pipignu
Regular Visitor

sum words in multiple tables, how to?

Hello,

 

I need to sum words from different tables. Example:

 

TABLE1
Column Name

FCO

FCO

FCO

MSE

MSE

 

TABLE2

Column Name

MCA

MCA

FCO

MSE

 

I need to obtain this result: Total: 9. FCO=4, MSE=3, MCA=2.

 

Could you help me please?

 

Thanks

1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft
Microsoft

Hi @pipignu,

 

Based on my test, you can firstly use the formula below to create a new union table.

Table =
UNION (
    SELECTCOLUMNS ( Table1, "NewColumn", Table1[Column Name] ),
    SELECTCOLUMNS ( Table2, "NewColumn", Table2[Column Name] )
)

t1.PNG

 

Then you should be able to show the "NewColumn" and [Count of NewColumn] from the new created table on the Table visual to get your expected result. Smiley Happy

r1.PNG

 

Regards

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User III
Super User III

Hi,

 

Using Query Editor, you can append data from both tables into a single one and then write this measure.

 

=COUNTROWS(Data[Names])

 

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-ljerr-msft
Microsoft
Microsoft

Hi @pipignu,

 

Based on my test, you can firstly use the formula below to create a new union table.

Table =
UNION (
    SELECTCOLUMNS ( Table1, "NewColumn", Table1[Column Name] ),
    SELECTCOLUMNS ( Table2, "NewColumn", Table2[Column Name] )
)

t1.PNG

 

Then you should be able to show the "NewColumn" and [Count of NewColumn] from the new created table on the Table visual to get your expected result. Smiley Happy

r1.PNG

 

Regards

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors