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.
Power Query takes from a cell the path it should go for the source files.
I want to handle the situation when there are no files in that folder or when there isn't any text in the cell referring to the path. The goal is to skip the following steps (or maybe to cheat the next steps with an empty table).
I tried, among many things, the functions try... otherwise without any success.
This is how my code starts:
let
DataAcesPath = Excel.CurrentWorkbook(){[Name="DataAcesPath"]}[Content][Column1]{0},
Origen = Folder.Files(DataAcesPath) ,
#"Archivos ocultos filtrados1" = Table.SelectRows(Origen, each [Attributes]?[Hidden]? <> true),
Could you please help me out with this?
Many many thanks for your support,
Geronimo
Thanks @lbendlin
Would you teach me how to do it?
I've been trying several ways, but I cannot find the way to write in the code, "if the folder is empty, use this empty table"
Cheers
Folder.Files() produces a lot of columns. Which of these do you need in the next steps?
Read about #table()
(or maybe to cheat the next steps with an empty table)
Sounds like the most robust option.
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 |
---|---|
15 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
7 | |
6 |