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

Sum of measures or sum of column summaries

Let's say i've got 8 tables a,b,c...  (300 000 to 5 000 000 rows) each of these containing column called "Value".In each table i've got measure that summarizes the "Value" column:

 Total Value [name of table] = SUM("Value")

and then in table that is connected to all of them i gather all that measures in single measure:

 All Total Values = CALCULATE(Total Value a + Total Value b ....)

Is it an optimal solution? or shall I skip measures and do it like this: 

All Total Values = CALCULATE(SUM('a'[Value])+SUM('b'[Value])+...)

What is better when i'm looking for performance and size reduction of dataset?

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous

For [Value] are from 8 tables, if you do not need to use each [Total Value] separately, you could just use this measure like this:

All Total Values = CALCULATE(SUM('a'[Value])+SUM('b'[Value])+...)

 else you could create a measure for each table and use this measure like this:

All Total Values = CALCULATE(Total Value a + Total Value b ....)

They are basically the same, do not worry which is better.

 

And if these 8 tables have the same data structure, you may try to use Append Function in Edit Queries to append 8 tables to one

new table, then you could just sum[value] of new table.

https://support.office.com/en-us/article/append-queries-power-query-e42ca582-4f62-4a43-b37f-99e2b2a4813a

 

 

Best Regards,
Lin

Community Support Team _ Lin
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

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @Anonymous

For [Value] are from 8 tables, if you do not need to use each [Total Value] separately, you could just use this measure like this:

All Total Values = CALCULATE(SUM('a'[Value])+SUM('b'[Value])+...)

 else you could create a measure for each table and use this measure like this:

All Total Values = CALCULATE(Total Value a + Total Value b ....)

They are basically the same, do not worry which is better.

 

And if these 8 tables have the same data structure, you may try to use Append Function in Edit Queries to append 8 tables to one

new table, then you could just sum[value] of new table.

https://support.office.com/en-us/article/append-queries-power-query-e42ca582-4f62-4a43-b37f-99e2b2a4813a

 

 

Best Regards,
Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello @Anonymous For this case I don't think you will notice any change in the performance, you coul try both options: 1. All Total Values = [Total Value a] + [Total Value b] + ...... 2. All Total Values = SUM('a'[Value]) + SUM('b'[Value]) + ...... BTW see that you don't need the CALCULATE function. Good Luck.

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.