Forum Discussion
Matthew
10 years agoNew Member
Dax
Hi, I hope someone can help me to write a Measure in PowerBI to sum the Revenue for the distinct Customers.
The sum of the Revenue below is £80. Tom has two Tasks set (a and b), but I only want to sum the Revenue for Tom, i.e. Tom's revenue is £10, James' is £15, etc. The total sum for the Revenues for the distinct Customer should total £50.
Hopefully some wiz can advise a suitable answers.
Thanks.
| Customer | Task | Revenue, £ |
| Tom | a | 10 |
| Tom | b | 10 |
| James | c | 15 |
| George | d | 20 |
| James | e | 15 |
| Harry | f | 5 |
| Harry | g | 5 |
1 Reply
- AnonymousNot applicable
Matthew You can do this by creating two Measures, the first supports the second.
First create the max value
Max = MAX(Table1[Revenue, £])
Then you can use SUMX to take that max value by distinct Customer
DistinctSum = SUMX(DISTINCT(Table1[Customer]), [Max])
Here is a breakdown of what it looks like in table next to other measures and your columns.