I have two tables, "stock" and "prices". In table "stock" I made a calculated column in the DAX-editor (called "Voorraad").
Voorraad = CALCULATE (COUNT(stock[EAN]), stock[Locatie] IN {"magazijn", "ontvangst"})
The two tables are related on "EAN", a many-to-many relationship.
The visualization in PowerBi shows a right outcome for the column "Voorraad". Then I also wanted to add a column in the visualization with "stockvalue", which shows me the multiplication of "Voorraad" by "Inkoop".
This is working out by a measure named "stockvalue" in table "stock":
stockvalue = SUM(stock[Voorraad])* SUM('prices'[inkoop])
Per row this works fine. But putting it in a table-visualization the total row also shows the multiplication of the total-voorraad * the total-inkoop. So this gives (in my example) the output of 379 * € 88,35 = € 33484,65 Which obviously should be € 3133,00
Anyone knowing the right thing to get this working?