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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.