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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Silvermountain
Frequent Visitor

Countrows gives no value

Hello!

 

I want to count the number of rows in a table. My PBI file contains multiple tables. In one table, I can use the DAX expression countrows and get the correct result, in another it always returns blank.

 

The query looks like this:

Silvermountain_0-1665741838594.png

 

And the formula ('leeg' means blank or empty):

Silvermountain_1-1665741858634.png

 

I have the same issues with other tables in my file. Some work, some don't. What could be a solution to this?

 

 

1 ACCEPTED SOLUTION

Have been looking into it for the last hour or so, and found the solution. Had to be in a relationship, so I tested all of them. There was a relationship to another table, with a few tables in between. This last table was empty and caused an issue for the table that wasn't empty.

Thanks for your replies 🙂 

View solution in original post

3 REPLIES 3
Silvermountain
Frequent Visitor

Hi @amitchandak , you can see a picture of the table in the first post. It does contain data, so we can rule that one out already.

I also found the trigger for not giving a value, but no work around yet. It is caused by one of the active relationships for this table. If I delete one of the highlighted relationships, the formula works as it should. I do need a relationship though, and it has to be on the currently selected column. I can't change the crossfilter direction of the relationship, this triggers an error. Any idea how to solve that?

Silvermountain_0-1665745078766.png

 

amitchandak
Super User
Super User

@Silvermountain , Strange, Hope the table you are giving is having data


Can you share a sample pbix after removing sensitive data?

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Have been looking into it for the last hour or so, and found the solution. Had to be in a relationship, so I tested all of them. There was a relationship to another table, with a few tables in between. This last table was empty and caused an issue for the table that wasn't empty.

Thanks for your replies 🙂 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.