Forum Discussion
Jos13
5 years agoHelper III
Sum Distinct Values
Hi Team,
I have the following data.
I want to create a measure that calculates Customer A's sale as 100 when user selects Jan 1 on slicer and 220 if user selects date range between 1st and 2nd Jan.
I tried taking the sum of averages, but it didn't work.
Please help me on this.
Regards,
Jos
Try the below DAX measure.
Measure1 = VAR _x = SUMMARIZE ( 'Table', 'Table'[Date], 'Table'[Customer], 'Table'[Sale] ) VAR _sum = SUMX ( _x, [Sale] ) RETURN _sum
Regards,
Nandu Krishna
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 👍
Proud to be a Super User!
3 Replies
- nandukrishnavsCommunity Champion
Try the below DAX measure.
Measure1 = VAR _x = SUMMARIZE ( 'Table', 'Table'[Date], 'Table'[Customer], 'Table'[Sale] ) VAR _sum = SUMX ( _x, [Sale] ) RETURN _sum
Regards,
Nandu Krishna
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 👍
Proud to be a Super User!
- Jos13Helper III
Thank you nandukrishnavs
Much appreciated.
- Syndicate_AdminAdministrator
that solution worked for me, it's very good, and it's the equivalence of "DISTINCT" in SQL