Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Sum of Distinct ID with multiple Distinct values

 

My data:

 


Kindly help!

  • Anonymous 

     

    In that case

     

    =
    SUMX (
        CALCULATETABLE ( VALUES ( Table1[Amount] ), ALLEXCEPT ( Table1, Table1[ID] ) ),
        [Amount]
    )
    

     

12 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you Zubair.  But it give me sum of including all other ids.  I need sum of Distinct values per distinct id.

       

      For example

       

      ID           Amount      Sum

      1             10           30

      1             20           30

      1             20           30

      1             10           30

      2             5             5

      2             5             5

      2             5             5

      3             10           45

      3             5             45

      3             10           45

      3             30           45

      3             5             45

       

       

       

       

      • Zubair_Muhammad's avatar
        Zubair_Muhammad
        Icon for Community Champion rankCommunity Champion

        Anonymous 

         

        In that case

         

        =
        SUMX (
            CALCULATETABLE ( VALUES ( Table1[Amount] ), ALLEXCEPT ( Table1, Table1[ID] ) ),
            [Amount]
        )