Forum Discussion
How to find the variance from two table using total value?
- Anonymous2 years ago
Hi Anonymous ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create measures.
TotalTable1 = SUM('Table (1)'[value])TotalTable2 = CALCULATE(SUM('Table (2)'[value]),FILTER(ALLSELECTED('Table (2)'),'Table (2)'[type]=MAX('Table (1)'[type]) && 'Table (2)'[id]=MAX('Table (1)'[id])))AllTotal = [TotalTable1] - [TotalTable2]TotalPercent = DIVIDE([AllTotal], [TotalTable2], 0)(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create measures.
TotalTable1 = SUM('Table (1)'[value])TotalTable2 = CALCULATE(SUM('Table (2)'[value]),FILTER(ALLSELECTED('Table (2)'),'Table (2)'[type]=MAX('Table (1)'[type]) && 'Table (2)'[id]=MAX('Table (1)'[id])))AllTotal = [TotalTable1] - [TotalTable2]TotalPercent = DIVIDE([AllTotal], [TotalTable2], 0)
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Refer to:
How to provide sample data in the Power BI Forum
How to Get Your Question Answered Quickly
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.