Forum Discussion

Macfackle's avatar
Macfackle
New Member
8 years ago
Solved

Summing across relationships

HI, I am a new user, and I built a model to play around with to figure out relationships but I came across an issue which I don't understand how to solve.

I have two tables:

 



 

So if I sum of all the values in the company table I get a a total of 150, but if I view the values by the user there is double counting and I get a value of 200, I understand why this happens, I just an unsure how to solve this, any help understanding or resources to refer to would be very much appreciated.

  • Hi Macfackle

     

    You may try to use ALL Function to create sum measure. For example:

     

    Measure =
    CALCULATE ( SUM ( Company2[Value] ), ALL ( Company1[User] ) )

    If it is not your case, please share your sample file. You can upload it to OneDrive or Dropbox and post the link here.

     

    Regards,

    Cherie

1 Reply

  • v-cherch-msft's avatar
    v-cherch-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi Macfackle

     

    You may try to use ALL Function to create sum measure. For example:

     

    Measure =
    CALCULATE ( SUM ( Company2[Value] ), ALL ( Company1[User] ) )

    If it is not your case, please share your sample file. You can upload it to OneDrive or Dropbox and post the link here.

     

    Regards,

    Cherie