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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Some13lse
Frequent Visitor

Report about dataflow content - unable to get columns

Greetings all,

My target is to build a report about the dataflows on our Power BI service.
The reports should show the workspaces, Dataflows, the tables and columns.
So far I was able to create a power query to obtain the data up till the table level.

// DataflowSource
let
    Source = PowerPlatform.Dataflows(null),
    Workspaces1 = Source{[Id="Workspaces"]}[Data],
    #"Removed Workspace Columns" = Table.RemoveColumns(Workspaces1,{"workspaceType", "Tags", "ItemKind", "ItemName", "IsLeaf"}),
    #"Renamed Workspace Columns" = Table.RenameColumns(#"Removed Workspace Columns",{{"workspaceId", "WorkspaceId"}, {"workspaceName", "WorkspaceName"}}),
    #"Expanded Dataflows" = Table.ExpandTableColumn(#"Renamed Workspace Columns", "Data", {"dataflowId", "dataflowName", "description", "Data"}, {"dataflowId", "dataflowName", "description", "Data.1"}),
    #"Renamed Dataflow Columns" = Table.RenameColumns(#"Expanded Dataflows",{{"description", "DataflowDescription"}, {"Data.1", "Tables"}, {"dataflowName", "DataflowName"}, {"dataflowId", "DataflowId"}}),
    #"Expanded Tables" = Table.ExpandTableColumn(#"Renamed Dataflow Columns", "Tables", {"Data", "entityName"}, {"Data", "entityName"}),
    #"Added Index" = Table.AddIndexColumn(#"Expanded Tables", "Index", 1, 1, Int64.Type),
    #"Renamed Table Columns" = Table.RenameColumns(#"Added Index",{{"entityName", "TableName"}, {"Data", "Columns"}, {"Index", "TableId"}}),
    #"Reordered Columns" = Table.ReorderColumns(#"Renamed Table Columns",{"WorkspaceId", "WorkspaceName", "DataflowId", "DataflowName", "DataflowDescription", "TableId", "TableName", "Columns"}),
    #"Expanded Columns" = Table.ExpandTableColumn(#"Reordered Columns", "Columns", {"sd_aanbieder_KEY", "sd_aanbieder_bk", "Code aanbieder"}, {"Columns.sd_aanbieder_KEY", "Columns.sd_aanbieder_bk", "Columns.Code aanbieder"})
in
    #"Expanded Columns"


I Strugle to obtain the Column level.
The structure per table will differ and to use Table.ExpandTableColumn you need give a list of the columns.
Something like the following step needs to be done so the result of the query will contain a row for every column of every table.

let
    Source = DataFlowSource,
    Columns = Source{0}[Columns],
    #"Unpivoted Columns" = Table.UnpivotOtherColumns(Columns, {}, "ColumnName", "Value"),
    #"Removed Columns" = Table.RemoveColumns(#"Unpivoted Columns",{"Value"}),
    #"Grouped Rows" = Table.Group(#"Removed Columns", {"ColumnName"}, {{"NumberOfRows", each Table.RowCount(_), Int64.Type}})
in
    #"Grouped Rows"

 
How can this be done?

3 REPLIES 3
Some13lse
Frequent Visitor

Thanks for your reply @lbendlin ,

I was not aware of the Scanner API and have no experience in using Power BI REST APIs.
We are not on Fabric and it is not clear yet if we will be in the near future, so therefore not used Purview.



Purview works with legacy Power BI too.

lbendlin
Super User
Super User

Any particular reason for not using the Scanner API or Purview for this?

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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