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
johnkarlhill
Regular Visitor

SUM a column filtering out duplicates of another column and filter on values in a third column

Hello Smart Folk!

I have a large table of data where multiple clients are associated to the same proposal.

I would like to calculate the sum of "GP" of "Sold" and "Almost Sold" but not include duplicates of the same proposal or "No Sale".

In the sample data below, the total should be $11,000 (2800+2800+2200+3200).

 

I tried creating an intermediate measure with:

DistinctSold = MAXX(DISTINCT('Table'[Proposal]),SUM('Table'[GP]))

But I get the error "Function 'MAXX' is not supported in this context in DirectQuery mode."

 

Any ideas?

 

See sample table:

ClientProposalGPStatus
Bobabc $2,800.00 Sold
Joeabc $2,800.00 Sold
Marybcd $2,800.00 Sold
Suecde $2,200.00 Almost Sold
Ellencde $2,200.00 Almost Sold
Frankcde $2,200.00 Almost Sold
Timdef $2,500.00 No Sale
Billdef $2,500.00 No Sale
Jimefg $3,200.00 Sold

 

1 REPLY 1
johnkarlhill
Regular Visitor

Bump...

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.