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
rcmv
New Member

How to expand multiple table links on a query?

Hi folks!

I have the query below which is trowing me the following error: 

"(step 'SourceFinal5G') references other queries or steps, so it may not directly access a data source. Please rebuild this data combination."

The issue is related with the line:

 

 

#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File (4)", Table.ColumnNames(#"Transform File (4)"(#"Sample File (4)")))

 

 

By some reason it is giving a conflict when accessing the "Transform File (4)" column which contains the link to tables which contain data. 

transformFile.png

Any idea on how I can overcome this issue? I have already adjusted the Data Source Privacy Levels to none.

More details on the Query below:

 

 

 

let
    // Custom function to check if folder is empty:
    IsFolderEmpty = (folderPath as text) as logical =>
		// This function receives a parameter named folderPath of type text.
		// As logical is the return type of the function. 
		// The function will return a logical value (true or false) indicating whether the folder is empty or not.
		// => This arrow indicates the beginning of the function body. 
        let
            SourceF = Folder.Files(folderPath), // Use folderPath parameter here
            #"FilesCount" = Table.RowCount(SourceF),
            #"Verdade" = if #"FilesCount" > 0 then true else false
        in
            #"Verdade",
            
    // Define the folder path:
    NRReportFolder5g = #"NRReportFolder",

    // Check if folder is empty:
    FolderIsEmpty = IsFolderEmpty(NRReportFolder5g),

    // Load data if folder is not empty
    SourceFinal5G = if FolderIsEmpty = 0 then null else 
    (
         let
            Source1 = Folder.Files(NRReportFolder5g),
            #"Filtered Hidden Files1" = Table.SelectRows(Source1, each [Attributes]?[Hidden]? <> true),
            #"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File (4)", each #"Transform File (4)"([Content])),
            #"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
            #"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File (4)"}),
            #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File (4)", Table.ColumnNames(#"Transform File (4)"(#"Sample File (4)")))
        in
            Source1
    )
in
    SourceFinal5G

 

 

 
1 REPLY 1
lbendlin
Super User
Super User

Inline the 

 #"Transform File (4)"

function into the current partition like you did with the IsFolderEmpty function

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