cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syndicate_Admin
Administrator
Administrator

Count number of rows in all tables

Hello

I wanted to see how to create a table that shows the number of rows that contain all the tables in the report.

An example of the new table to be created would be:

NombreTablaRows
Table A65
Table B30
Table C18

Thanks a lot!

2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User IV
Super User IV

@Syndicate_Admin 

Table = 
    { 
        ( "Table A", COUNTROWS('Table A') ),
        ( "Table B", COUNTROWS('Table B') ),
        ( "Table C", COUNTROWS('Table C') )
    }

 


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




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

Proud to be a Super User!




View solution in original post

CNENFRNL
Super User III
Super User III

Maybe some 3rd party tools do the trick; or resort to Power Query,

let
    Source = 
    let 
        tabs = List.Select(Record.FieldNames(#shared), each Text.Contains(_, "Table ")), 
        rs = List.Transform(tabs, each Table.RowCount(Expression.Evaluate("#""" & _ & """", #shared))) 
    in 
        Table.FromColumns({tabs, rs}, {"Table Name", "Rows"})
in
    Source

Screenshot 2021-06-01 214656.png

View solution in original post

2 REPLIES 2
CNENFRNL
Super User III
Super User III

Maybe some 3rd party tools do the trick; or resort to Power Query,

let
    Source = 
    let 
        tabs = List.Select(Record.FieldNames(#shared), each Text.Contains(_, "Table ")), 
        rs = List.Transform(tabs, each Table.RowCount(Expression.Evaluate("#""" & _ & """", #shared))) 
    in 
        Table.FromColumns({tabs, rs}, {"Table Name", "Rows"})
in
    Source

Screenshot 2021-06-01 214656.png

View solution in original post

Greg_Deckler
Super User IV
Super User IV

@Syndicate_Admin 

Table = 
    { 
        ( "Table A", COUNTROWS('Table A') ),
        ( "Table B", COUNTROWS('Table B') ),
        ( "Table C", COUNTROWS('Table C') )
    }

 


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




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

Proud to be a Super User!




View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.