Forum Discussion

CJ_96601's avatar
CJ_96601
Icon for Helper V rankHelper V
7 years ago

Sum Value based on distinct record from other column

 

Need to sum up values of the largest amount based on badge number and  based on selected year.  Below is the sample table for easy reference.  I appreciate your help

 

Bold data (the largest of the amount for each badge number)  to be added.

 

BadgeNoAmountYear
120002018
130002018
110002019
150002018
260002018
280002018
220002019
250002018
320002018
450002018
460002018
550002018
   
Total for  Year 2018  (based on the largest amount per badge number26000 

 

16 Replies

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

    CJ_96601  Please create a new table as below and use the Year and Amount field from this new table in your visuals.

     

    Test219Out = SUMMARIZE(Test219MaxSum,Test219MaxSum[Year],Test219MaxSum[BadgeNo],"Amount",MAX(Test219MaxSum[Amount]))

    • CJ_96601's avatar
      CJ_96601
      Icon for Helper V rankHelper V

      Thank you for your reply.  Can you share the pbix sample file.

       

       

      • CJ_96601's avatar
        CJ_96601
        Icon for Helper V rankHelper V

        error.  Multiple columns cannot be converted to a scalar value