Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Power BI Summing Issue. Many to one Relationship

I have two tables with Many to One relationship. 

 

Alumni Affiliations Table, A single ID_NUMBER can have more than 1 Affliated schools (Many) 

ID_NUMBERAFFILATION_SCHOOL
0029000017Undergraduate College
0029000017Graduate School
0029000047Athletics
0029000047Undergraduate College
0034000003Engineering
0041000086Education Affiliate
0043000076Dentistry
0046000004Law
0047000061Athletics
0047000061Engineering
0049000000Athletics
0049000000Law

 

Metrics Table,  ID_Number is unique, it shows total money raised for each student ID.(One)

ID_NUMBERTotal Money Raised
00290000171210
002900004710
0034000003670
00410000860
0043000076100
00460000040
00470000610
00490000000
005100000350

 

Currently there is a Many to One realtionship with cross filter direction set to Both:

Data Model

When I do a table that shows Total money raised by Affiliation School the Sum is not correct,

 

 

 

 

 

 

 

 

If you add the values manually, the toal is 3210.00 

 

Why are these values wrong and what can I do to correct the Total values by school?

 

Thanks for the help!

Jay

 

6 Replies

  • Can allocate the value like

    divide(sum(Table2[Total Money Raised]), count(Table1[ID_NUMBER]))

     

     

    • amitchandak's avatar
      amitchandak
      Icon for Super User rankSuper User

      I think your initial calculation is correct. Because your total should not count repeated amount ??

       

  • Hi,

     

    I think there is an error in the data model and the relationship. Please verify the data again and upload the pbix file. Because as I can see in the above Alumni Affiliations Table, the Id number is allocated to multiple AFFILATION_SCHOOL.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi, 

       

      Yes one student ID can be affiliated with more than one school. This is why there is a many to one relationship. 

       

       

       

      • piyushszope's avatar
        piyushszope
        Icon for Helper I rankHelper I

        Then to accomplish that you can create a related calculated column or measure.



        And then you can get your desired solution.



        If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark my post as a solution.
        Thanks!