today I have a challenge for you that I can not finally solve.
Currently, a matrix displays the total amounts between two companies.
However, I would like to have only the difference amounts displayed.
Since the underlying FactTable is several million rows large, I would like to calculate this using a Measure / Virtual Tables.
Unfortunately, all my efforts so far have been unsuccessful.
My last approach to create this via a virtual table fails because I was not able to assign the amounts for Amount 2 using the columns Company 2 and IC Partner Company 2.
@d.mesch I looked at you pbix file. You have the same company values as in your lookup tables (160, 180, etc) I guess you created these tables for slicers? You can only use TREATAS for tables that you want to use as a virtual relationship but in this case I don’t know why you would.
I would do a simple DAX of sum of your IC company values and do the same for your company values then a DAX measures for the difference.
Totals IC Partner = sum( FactTable[IC Partner Company] )
Totals Company Partner = sum( dim_Company[Company] )
SUM of Amount = sum( FactTable[Amount])
Diff Company = [Totals IC Partner] - [Totals Company Partner]
Dates should be the only relationship to your fact table that I can see.
Hello @d.mesch, it’s been a while since we got a response from you. In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.
sorry for answering late. But I really needed some holidays.
I think we have misunderstood in the solution.
As you can see in the image, I like to have the difference per Period, Account, … off the amount between the company and the IC company. So for example the dif. between company 160 and IC Company 180 for January is 0, for April is 100 and for the full year is 4400.
But instead of showing the Total amounts, I need to only show the difference in the table, so 0 for January, 100 for April, 4400 as the sum, and so on.