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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
ghouse_peer
Post Patron
Post Patron

Row Count Not Matching

I have one fact table connected using Direct Query. and then created 2 calendar tables and one Table which has LE which is numeric.

now in advance editor for all these three we have created parameter linking to the respective date and LE coulmn in Fact column and all are in TEXT format.

parameter is such a way that when its null or noting is selected it should be current date else whatever the value is selected by the user.
and LE is defaulted to 732 if noting is selected. else whatever the value user selects.

 

now i have used table visual and selected the columnn which are required from fact table. 

i have used the measure =COUNTROWS([Tablename])+0.

 

i have taken this measure in card visual.

 

now Table visual is showing 2 rows and Card visual i,e measure is showing as 7.

 

please let me know how to resolve this.

1 ACCEPTED SOLUTION
mark_endicott
Super User
Super User

@ghouse_peer - it is possible that there are duplicated rows in your Fact table, and power bi is condensing these into 2 rows in the table visual. 

 

You can check this by setting each column in your table to "Don't Summarize":

 

mark_endicott_0-1750845072566.png

 

If this does not resolve thngs, we'll need to know more about your model. 

 

also COUNTROWS([Tablename])+0 - will be incredibly bad for a direct query table on the basis it will need to run a query over every single row of your table to establish the 0 result. here's an article explaining how bad it is for performance: https://blog.crossjoin.co.uk/2024/07/07/dax-measures-that-never-return-blank/

 

and some suggestions for the best way to fix it: https://blog.crossjoin.co.uk/2024/11/03/different-ways-to-replace-blanks-with-zeros-in-dax/ 

 

If I answered your question please mark my post as the solution, it helps others with the same challenge find the answer!

View solution in original post

2 REPLIES 2
mark_endicott
Super User
Super User

@ghouse_peer - it is possible that there are duplicated rows in your Fact table, and power bi is condensing these into 2 rows in the table visual. 

 

You can check this by setting each column in your table to "Don't Summarize":

 

mark_endicott_0-1750845072566.png

 

If this does not resolve thngs, we'll need to know more about your model. 

 

also COUNTROWS([Tablename])+0 - will be incredibly bad for a direct query table on the basis it will need to run a query over every single row of your table to establish the 0 result. here's an article explaining how bad it is for performance: https://blog.crossjoin.co.uk/2024/07/07/dax-measures-that-never-return-blank/

 

and some suggestions for the best way to fix it: https://blog.crossjoin.co.uk/2024/11/03/different-ways-to-replace-blanks-with-zeros-in-dax/ 

 

If I answered your question please mark my post as the solution, it helps others with the same challenge find the answer!

Thanks, its working. And yeah we should avoid +0 using in direct query. Thanks for the info

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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