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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
FredLEGUEN
Helper III
Helper III

Return in a table the number of rows of each queries

Hi,

 

Is there a way to return in a table the number of rows of each queries ?

I want to have the result displays in the pane in a single report.

 

Is it possible ?

Number of rows for each queryNumber of rows for each query

Ok, I can create a group by query for each query but it's a waste of time.

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

you can do it with #shared, you will just have to filter your queries in #"Filtered Rows"

let
    Source = #shared,
    #"Converted to Table" = Record.ToTable(Source),
    #"Filtered Rows" = Table.SelectRows(#"Converted to Table", each ([Name] = "D35" or [Name] = "D39")),
    #"Added Custom" = Table.AddColumn(#"Filtered Rows", "NrOfRows", each Table.RowCount([Value])),
    #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Name", "NrOfRows"})
in
    #"Removed Other Columns"


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

2 REPLIES 2
Stachu
Community Champion
Community Champion

you can do it with #shared, you will just have to filter your queries in #"Filtered Rows"

let
    Source = #shared,
    #"Converted to Table" = Record.ToTable(Source),
    #"Filtered Rows" = Table.SelectRows(#"Converted to Table", each ([Name] = "D35" or [Name] = "D39")),
    #"Added Custom" = Table.AddColumn(#"Filtered Rows", "NrOfRows", each Table.RowCount([Value])),
    #"Removed Other Columns" = Table.SelectColumns(#"Added Custom",{"Name", "NrOfRows"})
in
    #"Removed Other Columns"


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Thanks @Stachu 

I knew #shared to display all the functions but I didn't know this function display also the current queries.

 

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors