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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Create a table/matrix visualization that shows a list of tables and the row count of each table

I have about 38 tables that I need to get rowcounts for and display the row count for each table. Unfortunately the COUNTROWS function seems to need me to specify the table name that I want a count for. Creating 38 separate COUNTROW measures doesn't seem to let me visualize the list in the right way either. 

 

I want the visual to look something like this. 

Table nameRow Count
A1000
B20000
C3000
D40000000


I have a table that has all the table names in them that could be used as a fact table. And there's the other 38 tables I need the row counts from. 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can create a new table with the table names and then create measure to calculate the number of rows in each table.table_name1.PNG

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

8 REPLIES 8
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

You can create a new table with the table names and then create measure to calculate the number of rows in each table.table_name1.PNG

 

Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

Why don't you append those tables in one ? 

https://docs.microsoft.com/en-us/power-bi/desktop-shape-and-combine-data#combine-queries

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

@camargos88 will that be an issue with 38 fairly large tables? 

 

But let's say I can append all the tables, then what?

It's not a problem.

What is the source ?

You can append them and create measure to show what you want (table name and row count).

 

Ricardo

 

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

Would I need to create a new column on each table with the table name first before appending? I need the row counts of multiple tables rather than the row count of a single large table. 

What is your source ?



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

Directquery with a SQL Database

 

If Direct Query I think it's better using a SQL command (

select table_name, count(*) (union all queries here) group by table_name)

 

Doesn't it work for you ?

 

Ricardo



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.