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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. 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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.