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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
Employee

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
Super User

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
Employee
Employee

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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