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

How to sum rows of different tables

I am really new to Power Bi,

 

I already created the dashboard that respresents the different types of "pageviews" and all of these rows are from different tables that were imported from google analytics. 

I want to create a measure, or something similar that can add all of the rows from my visual table that come from different tables. They have a One to many relationship within them...

 

Measure 2 = SUMX( 'ENDI-Android', 'ENDI-Android'[Pageviews] ) + SUMX('ENDI-iOS' , 'ENDI-iOS'[Pageviews]) + SUMX('ENDI-Lite' , 'ENDI-Lite'[Pageviews]) + SUMX('ENDI-Web' , 'ENDI-Web'[Pageviews]) + SUMX('Indice' , 'Indice'[Pageviews]) + SUMX('Magacín', 'Magacín'[Pageviews]) + SUMX('PorDentro', 'PorDentro'[Pageviews]) + SUMX('Sal-Android', 'Sal-Android'[Pageviews]) + SUMX('Sal-iOS', 'Sal-iOS'[Pageviews]) + SUMX('Sal-Web', 'Sal-Web'[Pageviews]) 
 
ˆˆˆ^this is what I was able to figure out, however, when I add the measure to my dashboard table, it is not adding the rows correctly.
 
Please help! Thank you!
2 REPLIES 2
Anonymous
Not applicable

OK, you're making it harder than it should be. Mate, just consolidate the tables into one big table and then instead of adding up many pieces, just write:

 

[Measure 2] := SUM( 'Consolidated Table'[Pageviews] )

 

and you're done. You can add columns to the big table to still be able to say which records belong to which table. and many other pieces of info. All doable in PowerQuery.

 

It would be good if people---before they start doing any serious BI work---learned something about data modeling.

 

Best

Darek

Anonymous
Not applicable

Hi,

Could you provide some more information about tables? There is a name of account or something? What does those tables looks like, If they are similar i would recomend to make name o Value column same for all of them, add new column called Type that will for one table always have same value for example "Android", make sure that they are the same in term of Table structure example column names: Name, Value, Type, Date and then go to querry editor and append them all. By that you will have one table with all your data with filter for type,

 

// I think that is best to connect tables if they contain same type of data

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.