Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Summary Table

Hi

I've the following table. I'm trying to get a summary of this table where i get things grouped by Doc# and to sum the income next to each Doc#

 

Doc#IncomePerson
902$900.00S
874$3,900.00D
874$12,310.00D
778$480.00D
778$5,000.00D
788$16,000.00D
778$3,000.00D
666$2,500.00R
724$850.00B

 

 

I wish the output to be:

DocIncomePerson
902$900.00S
874$16,210.00D
778$24,480.00D
666$2,500.00R
724$850.00B

 

 

I tried to do summarize table or summarizecolumns but I was not ablve to achieve what I want.

  • Hi Anonymous 

    Thanks for reaching out to us.

    please try this dax code,

    new table = SUMMARIZE('Table','Table'[Doc#],'Table'[Person],"sum",SUMX('Table','Table'[Income]))

     

    Best Regards,

    Community Support Team _Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

5 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    is your income a text field data type or a decimal data type?

    • Anonymous's avatar
      Anonymous
      Not applicable

      Decimal

      • vanessafvg's avatar
        vanessafvg
        Community Champion

        are you able to share your file?

         

        firstly what is the purpose of what you are doing, would a matrix visual work?

        are are you specifically trying to get a summarised calculated table?

  • Hi,

    To your visual, drag Doc# and Person and write this measure

    Total = sum(Data[Income])

    Hope this helps.

  • v-xiaotang's avatar
    v-xiaotang
    Community Support

    Hi Anonymous 

    Thanks for reaching out to us.

    please try this dax code,

    new table = SUMMARIZE('Table','Table'[Doc#],'Table'[Person],"sum",SUMX('Table','Table'[Income]))

     

    Best Regards,

    Community Support Team _Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.