Forum Discussion
Calculate sum values from multiple tables with filter
- 6 years ago
Hi AltusTellus ,
I made a sample .pbix file according to your description and used the measure you provided,but it seems no problem,see below:
Before adding one row in company 3,it shows :
After adding one row valued 75,it shows:
My measure is as below:
Measure = CALCULATE(SUM(tb_ReportingBalance_Company1[Amount PL]),FILTER('tb_ReportingBalance_Company1','tb_ReportingBalance_Company1'[Type] = 110)) + CALCULATE(SUM('tb_GLAccounts_Company2'[Amount PL]),FILTER('tb_GLAccounts_Company2','tb_GLAccounts_Company2'[Type] = 110))+CALCULATE(SUM('tb_GLAccounts_Company3'[Amount PL]),FILTER('tb_GLAccounts_Company3','tb_GLAccounts_Company3'[Type]=110))Pls check my .pbix file ,try to produce your senario and show me the error.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
AltusTellus , this seems correct.
The other way would be that you append the tables into one table.
https://radacad.com/append-vs-merge-in-power-bi-and-power-query
amitchandak I've the 8 tables appended to 1 new table. How can I filter with another table (like I wrote above)? Many thnx.
- tex6286 years ago
Community Champion
Before you append the tables, make sure that you have a company column in each table specifying which company the rows are related to. When you have this you should be able to use that column as a column/row dimension or a filter in a slicer.
Br,
J - v-kelly-msft6 years ago
Community Support
Hi AltusTellus ,
I made a sample .pbix file according to your description and used the measure you provided,but it seems no problem,see below:
Before adding one row in company 3,it shows :
After adding one row valued 75,it shows:
My measure is as below:
Measure = CALCULATE(SUM(tb_ReportingBalance_Company1[Amount PL]),FILTER('tb_ReportingBalance_Company1','tb_ReportingBalance_Company1'[Type] = 110)) + CALCULATE(SUM('tb_GLAccounts_Company2'[Amount PL]),FILTER('tb_GLAccounts_Company2','tb_GLAccounts_Company2'[Type] = 110))+CALCULATE(SUM('tb_GLAccounts_Company3'[Amount PL]),FILTER('tb_GLAccounts_Company3','tb_GLAccounts_Company3'[Type]=110))Pls check my .pbix file ,try to produce your senario and show me the error.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!