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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Dmitry_Chukov
Frequent Visitor

We cannot convert a value of type List to type Text.

I have to tables (1-Data, 2-Path). Table "Path" with only one row with path to folder. I try to paste path to folder from table "Path" for table "Data"

 

let
    Source = Folder.Files(Path[Path to folder]).

 

Expression.Error: We cannot convert a value of type List to type Text..
    Value=List
    Type=Type

 

 

 

1 ACCEPTED SOLUTION

You mean you get an error message. Why don't you mention that it is an error message?

 

Anyhow, you can prevent that error by adjusting the Privacy Level setting in File - Options and Settings - Options:

 

Ignore Privacy Levels.png

Specializing in Power Query Formula Language (M)

View solution in original post

6 REPLIES 6
MarcelBeug
Community Champion
Community Champion

The single argument for Folder.Files is path, so it is unclear what you try to concatenate.

 

Example: this is the path to my DateTimeTables folder:

 

= Folder.Files("C:\Users\Marcel\OneDrive - Bemint\Office 365\Power Query\DateTimeTables")

 

Can you explain what you try to achieve?

Specializing in Power Query Formula Language (M)

If i write with mistakes, Im sorry for my english.

 

I have a file "Data.xlsx", which updates every month and folder name changes every month  too

Path to file ("Data march.xlsx")

1. C:\Work\3. March\Data march.xlsx

2. C:\Work\4. April\Data april.xlsx   and so on

 

In Power BI i make a inquiry to excel files from folder C:\Work\3. March\  than make excel file (Path to folder) with only one table with one row, which automatically get path to file (C:\Work\3. March\, C:\Work\4. April\ and so on).  

 

I would like to automatically update the path to folder in inquiry for file "Data.xlsx" , so the path for source Source =Folder.Files ("C:\Work\3. March")  is now, i try get the path from inquiry/table "Path to folder".     Table "Path to folder" have column with name "Path" and one row with the path to folder ("C:\Work\4. April\")

 

Then you can use:

 

let
    Source = Folder.Files(#"Path to folder"[Path]{0})
in
    Source
Specializing in Power Query Formula Language (M)

I try it.

 

The inquiry "Data" (a step "Source") refers to other inquiries or stages and can't address data source directly. Change this combination of data.

You mean you get an error message. Why don't you mention that it is an error message?

 

Anyhow, you can prevent that error by adjusting the Privacy Level setting in File - Options and Settings - Options:

 

Ignore Privacy Levels.png

Specializing in Power Query Formula Language (M)

I am sorry, that i don't write it was a mistake.

 

I change Privacy Levels. Now it works.  Thank you very much.  

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.