Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
101 | |
45 | |
19 | |
13 | |
11 |