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 September 15. Request your voucher.

Reply
PBInJelly
Regular Visitor

DAX Measure for Counting # of 0s in a Column

Hi Folks, 

 

I've already done some research but am still having trouble on this. My objective is to display COUNT of 0s on a card from a specific column. Included some pics below. 

 

Thank you,

 

PBInJelly 

 

 

sssssssss.PNGcardddd.PNG

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

@PBInJelly Should just be a measure like:

Measure = COUNTROWS(FILTER('Table',[Days from] = 0))


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler Thanks for your feedback. Tried the DAX below...
 
ZEROS ONLY = COUNTROWS(FILTER('TABLE',[Days from/after Pickup Date] = 0))

 

And it is giving me a total of 540 when it should be 3 on the card. Any idea why?

@PBInJelly Hard to say without sample/source data. Are you truly trying to find 0's in a column in a table or is your zero count based upon a measure in a table visual?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler The column is an existing measure that simply subtracts from a local date. I'm trying to get the number of single "0"s from either the table/column in power query or the visual table's column. 

@PBInJelly Well if it is the latter, construct the table visualization as a table VAR in DAX using ADDCOLUMNS, etc. Then you can COUNTROWS(FILTER()) across it or use things like COUNTX.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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