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
mikeoshields
Helper I
Helper I

Count Number of Values in a Matrix

Dax question.  Below is a matrix of results and the rows/columns/values in the PowerBI project.  I need to count the number of values that are less than zero (see below).  

mikeoshields_0-1615922674328.png

mikeoshields_3-1615923297117.png

 

 

What I'm looking for is something like this:

mikeoshields_1-1615923023932.png

 

Any ideas would be appreciated.

3 REPLIES 3
amitchandak
Super User
Super User

@mikeoshields , Try measure like

 

countrows(summarize(Table[productCD], Table[Qtyonhand], Table[Date].Year, Table[Date].month))

 

or

 

 

countrows(summarize(Table[productCD], Table[Date].Year, Table[Date].month))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thanks but that did not give me what I need.  I'd be happy to upload an excel file with the raw data as well as the PowerBI file but there doesn't seem to be a way to do that!

 

 

mikeoshields_1-1615987103182.png

 

I've included a link to the .pbix file as well as an excel spreadsheet of the raw data.  Again, any help is appreciated.

 

Count Number of Values in a Matrix 

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.