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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! 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
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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 Solution Authors