Forum Discussion
Subtract measure category from two different table
- 6 years ago
Hi Mani_ms ,
Believe that the best option is to create a dimension table with unique values that allow to relate both companies at the sub category without the many to many category but with one to many relationship between the tables so you would have:
Table 1 * <- 1 Dimension Group1 1 -> * Table 2
Table 1 * <- 1 Dimension Group2 1 -> * Table 2
That will help you achieve the result better, also believe that if you have the information as provided below you should also do a unpivot on each country name that would allow you to make a dimension table on country and facilitate the calculations.
Then just use a measure:
MEasure= SUM(Table1[Value])- SUM(Table2[Value])Or whatever is the calculation you need.
Check PBIX file attach.
Hi Mani_ms ,
Believe that the best option is to create a dimension table with unique values that allow to relate both companies at the sub category without the many to many category but with one to many relationship between the tables so you would have:
Table 1 * <- 1 Dimension Group1 1 -> * Table 2
Table 1 * <- 1 Dimension Group2 1 -> * Table 2
That will help you achieve the result better, also believe that if you have the information as provided below you should also do a unpivot on each country name that would allow you to make a dimension table on country and facilitate the calculations.
Then just use a measure:
MEasure= SUM(Table1[Value])- SUM(Table2[Value])
Or whatever is the calculation you need.
Check PBIX file attach.
Thank you .
Its working fine