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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
EdK99
Frequent Visitor

COUNT, COUNTROWS, and COUNTA are returning wrong values

Hello,

 

I'm trying to use the count functions and they are returning different values than what they're supposed to.

 

Measure LIVE Orders = CALCULATE(COUNTROWS(Table2022), 'Table2022'[Order Status] = "LIVE", 'Table2022'[Price] <> BLANK())
 
When I look into my excel sheet after I filter the status to live and the price to All except for blanks I get 28 rows, when I look in the data tab in power bi and I filter the same way I also get 28 rows, but when I use any count function it returns only 27 rows.
Note: one of the Price column rows has a value of 0, and two of the rows in the Price column have the same value. Also, If I add the condition I need in the filter pane of the visualizer and choose advanced filtering: is not blank and remove this part Table2022'[Price] <> BLANK() of my measure., I get 28 rows, I also get the correct result (28) if I use a slicer and remove this part Table2022'[Price] <> BLANK() of my measure.
I'm not sure if that's causing the error or not but I'd really like to get this fixed.
 
 
Any thought?
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Blank equates to 0 so don't use var = BLANK(), or var <> BLANK(). Instead use the ISBLANK() function, or NOT ISBLANK()

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

Blank equates to 0 so don't use var = BLANK(), or var <> BLANK(). Instead use the ISBLANK() function, or NOT ISBLANK()

EdK99
Frequent Visitor

That did it!! thanks a lot

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors