Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
laitung1991
Frequent Visitor

DISTINCT AND SUM MULTIPLE

I have table and i want to create maxtrix in visualizations 

Capture.PNG

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

1 ACCEPTED SOLUTION
dax
Community Support
Community 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]
)

419.PNG

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.

View solution in original post

3 REPLIES 3
dax
Community Support
Community 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]
)

419.PNG

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.

amitchandak
Super User
Super User

This seems like the sum of the Averages problem.  Please, ref the link below. Do count distinct  in place of Avg

 

https://community.powerbi.com/t5/Desktop/SUM-of-AVERAGE/td-p/197013

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.