DAX Measure: Sum specific column from all Identical Tables

mirology

New Member
Joined
Oct 9, 2015
Messages
20
Hello everyone ,

So i have N Number of Tables containing data (Table1, Table2, Table3 ,.... Table N) all of which have the same column names inside ( for example Table1[Sales] .. Table2[Sales] ) also those tables are related to a Calendar table by "Date".


I want to create a measure that sum [Sales] From all those tables without having to type "= Sum(Table1[Sales]) +Sum(Table2[Sales]) + ... Sum(TableN[Sales )) as i have alot of tables and writing a very long equation like this will be inefficient

Annotation 2020-07-01 182211.pngAnnotation 2020-07-01 181840.png
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Why don't you append these tables using power query? if not then you will have to create a new calculated table using UNION, that could be a bit messy and will increase the size of your model.
 
Upvote 0
Yeah i have thought about those methods and found them inefficient and as you have said it will increase Model Size ... i have managed for now to have a work-around using VBA to automate the process of creating the measure Formula "= Sum(Table1[Sales]) +Sum(Table2[Sales]) + ... Sum(TableN[Sales )) by looping through a table containg table names
 
Upvote 0

Forum statistics

Threads
1,214,791
Messages
6,121,611
Members
449,038
Latest member
apwr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top