Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I am facing this problem sometimes so i would like to know if any of you could help me.
My doubt is about loading data depending on a parameter. I mean.. i have to load an excel file and that works fine, the problem is that sometimes i will have to add another excel file (but not always!). That's the problem..sometimes i have 1 excel and another one 2 so i would like to add a parameter that indicate when i have one or two and depending on this load 1 or two excels files.
It will be something like:
IF parameter = 1 --> Load 1 and 2
IF parameter = 0 --> Load only 1
Not sure if it's possible..
Thank you in advance.
Andrea.
Solved! Go to Solution.
You could replace the second table with an empty table when it is missing.
Let's say you have 2 queries that you load. Then you union them into the final table.
In this case, add a custom step to your second query:
try #"Previous Step" otherwise #table(type table [], {})
Note that if you load the second table by itself into the model, it will be removed when it is not there, potentially breaking any visuals that depend on it, and removing any relationships. If instead you the second table to be empty then:
try #"Previous Step" otherwise #table(Value.Type(OtherTable), {})where OtherTable is the name of your first query. Also, if you do a Combine tables, you will need to do it in a new query instead of ontop of your first one.
You could replace the second table with an empty table when it is missing.
Let's say you have 2 queries that you load. Then you union them into the final table.
In this case, add a custom step to your second query:
try #"Previous Step" otherwise #table(type table [], {})
Note that if you load the second table by itself into the model, it will be removed when it is not there, potentially breaking any visuals that depend on it, and removing any relationships. If instead you the second table to be empty then:
try #"Previous Step" otherwise #table(Value.Type(OtherTable), {})where OtherTable is the name of your first query. Also, if you do a Combine tables, you will need to do it in a new query instead of ontop of your first one.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.