Forum Discussion

Matt-G's avatar
Matt-G
New Member
7 years ago
Solved

Many to Many Calculation Measure

Hey, I'm new to power bi and trying to replicate a report i built in Qlikview. I've got two tables with a many to many relationship. The first table is a utilisation table, and the second table is ...
  • Ashish_Mathur's avatar
    Ashish_Mathur
    7 years ago

    Hi,

    Do not create any relationship between the 2 tables.  In the Utilisation Table, write this calculated column formula.  Rename the column as Value

    =CALCULATE(SUM(Costs[CostUnit]),FILTER(Costs,Costs[VolKey]=EARLIER(Utilisation[VolKey])))

    To your visual, drag Utild from the Utilisation Table.  Write this measure

    =SUMX(Utilisation,Utilisation[Amt]*Utilisation[Value])