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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

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.