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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

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

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.