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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
juwis
Regular Visitor

Number of rows for each table in Power Query error

I've tried to create a table with the number of rows of every table in my Power BI report (with some exceptions) using Power Query: 

 

let
    #"Section1" = #sections[Section1],
    #"TableList" = List.Select(Record.FieldNames(#"Section1"), each not (Text.Contains(_,"Nøgletal:") or Text.Contains(_, "Aktuel rapport") or Text.Contains(_, "Tabeloversigt"))),
    #"RowCount" = List.Transform(#"TableList", each Table.RowCount(Expression.Evaluate("#""" &_& """", #shared))),
    #"Table" = Table.FromColumns({#"TableList", #"RowCount"}, {"Table Name", "Rows"}),
    #"Changed type" = Table.TransformColumnTypes(Table,{{"Table Name", type text}, {"Rows", Int64.Type}})
in 
    #"Changed type"

 

It works perfectly fine in the Power Query-editor and is (in this case) looking like this: 

 

juwis_0-1696411562747.png

 

But when I try to apply the changes, I get an error per row in the table, and the Rows-column is empty. When I try to see the error in Power Query-editor, the error table is empty:

 

juwis_1-1696411822247.png

 

Any idea what I'm doing wrong?

1 REPLY 1
obak81
Regular Visitor

👀

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors