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
Matthew
New 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.

 

CustomerTaskRevenue, £
Toma10
Tomb10
Jamesc15
Georged20
Jamese15
Harryf5
Harryg5
1 REPLY 1

@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.

breakdown.JPG


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

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.

Top Solution Authors
Top Kudoed Authors