Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
Hello everyone!
I would like to use dataflows to connect to some data that is stored in a folder (that folder contains many identical csv files that are generated daily).
Unfortunately, unlike on Power BI Desktop, Power Query in dataflows does not generate the table automatically and only the "Source" step is generated so I end up with a table that is not usable :
As suggested elsewhere in this forum, I copied the code in the Advanced editor from the Desktop:
let
Source = Folder.Files("MyPath"),
#"Filtered Hidden Files1" = Table.SelectRows(Source, each [Attributes]?[Hidden]? <> true),
#"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transform File (2)", each #"Transform File (2)"([Content])),
#"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {"Name", "Source.Name"}),
#"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transform File (2)"}),
#"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transform File (2)", Table.ColumnNames(#"Transform File (2)"(#"Sample File (2)"))),
#"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{{"Source.Name", type text}, {"RESORT_CODE", type text}, {"CONFIRMATION_NO", Int64.Type}, {"TEL", type any}})
in
#"Changed Type"
However, I get this message :
And indeed, if I go to the step #"Invoke Custom Function1", I can see that the query gives an [Error] instead of a [Table] :
If anyone knows how to solve this issue, your help would be immensly appreciated 🙂
Solved! Go to Solution.
I think two options:
From Power BI desktop rather than copying the advanced editor code select all the queries (including the merge files custom function folder and right click copy. Then in the service use CTRL V on the query pane to paste them all in. I think you were just missing the reference to the custom function.
That said have you tried just clicking the double down arrow at the top of the content column when you do the from folder step directly in the service?
OMG!
I was so simple! I indeed just clicked on the double down arrows and it worked! I did not know you could just do this 😅
Thanks a lot @bcdobbs !
I think two options:
From Power BI desktop rather than copying the advanced editor code select all the queries (including the merge files custom function folder and right click copy. Then in the service use CTRL V on the query pane to paste them all in. I think you were just missing the reference to the custom function.
That said have you tried just clicking the double down arrow at the top of the content column when you do the from folder step directly in the service?
Hi! I'm trying to do a similar thing by pasting the code in the query editor, but I am prompted with the below message. Could you please advise how to resolve this issue?
Many thanks!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
57 | |
28 | |
25 | |
22 | |
21 |
User | Count |
---|---|
58 | |
45 | |
24 | |
24 | |
18 |