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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
kevin757
New Member

Summing the Distinct Count in a matrix

I have data with all products which is showing the average list price and the average price that it was actually sold at. 

kevin757_1-1630771695322.png

 

My current Dax expression formula is :

# of Products Sold under Par =
calculate(DISTINCTCOUNT('Sold vs Par'[productname]),filter('Sold vs Par',average('Sold vs Par'[AvgSoldAmount])-AVERAGE('Sold vs Par'[ParPrice])<0))+0

 

The issue is when I put everything in a matrix it comes out like this:

 

I would like the black line to sum up the number of 1's in the column, any ideas? Help is much appreciated.

kevin757_0-1630771564143.png

 

6 REPLIES 6
Tanushree_Kapse
Impactful Individual
Impactful Individual

Hi @kevin757 ,

 

Try this measure:

Totalfix= SUMX(VALUES (Zones), # of products Sold under Par)

 

Mark this as a solution if I answered your question. Kudos are always appreciated.

Thanks.

Anonymous
Not applicable

Sorry That didnt work. For some reason when i do that it counted the sum as 0. Would you like me to send you the file itself?

kevin_ung_0-1631039497514.png

 

Yes @Anonymous , pls share the file

Anonymous
Not applicable

How can I send you the pbix file?

PaulDBrown
Community Champion
Community Champion

Try:

# of Products Sold under Par =
SUMX('Your table',
calculate(DISTINCTCOUNT('Sold vs Par'[productname]),filter('Sold vs Par',average('Sold vs Par'[AvgSoldAmount])-AVERAGE('Sold vs Par'[ParPrice])<0))+0)




Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






 

So each value is now showing the # of times where the average sale price was less than the average list price. 

kevin757_1-1630786270594.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.