Forum Discussion

laitung1991's avatar
laitung1991
Frequent Visitor
6 years ago
Solved

DISTINCT AND SUM MULTIPLE

I have table and i want to create maxtrix in visualizations 

with row of matrix table is NAME and value sum of amount with distinct ID and result :

NAME   AMOUNT

A          500

B          1100

but i effort write DAX but not result so i wish you guide me.

Thanks you

  • Hi laitung1991,

    You could try to use below measure to see whether it works or not

    Measure =
    SUMX (
        SUMMARIZE ( T3, T3[name], T3[id], T3[amount], "sumdistinct", T3[amount] ),
        [sumdistinct]
    )
    

    Best Regards,
    Zoe Zhi

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

3 Replies

  • dax's avatar
    dax
    Icon for Community Support rankCommunity Support

    Hi laitung1991,

    You could try to use below measure to see whether it works or not

    Measure =
    SUMX (
        SUMMARIZE ( T3, T3[name], T3[id], T3[amount], "sumdistinct", T3[amount] ),
        [sumdistinct]
    )
    

    Best Regards,
    Zoe Zhi

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

    • laitung1991's avatar
      laitung1991
      Frequent Visitor

      i don't think so, i want just sum not average, the example is created by data raw about 100.000 record and have many diffirence value