Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi there
How can I dynamically ignore ANY STEP if the step is irrelevant for the current dataset
For example,
Table1
Name | ID | Maths Score 1 | Maths Score 2 | |
abc@gmail.com | abc | 1234 | 38 | 40 |
I need to change the ID as text (Using simple Change Type) and add up Maths Score 1 & Maths Score 2 (Using a Custom Column with simple addition formula). I manage to do it in Power Query
However, sometimes the dataset comes like below where there's no ID and no Maths Score 1 but in my applied step I already have Change Type and the Custom Column in place hence it will prompt an error. How can I tell Power Query that if there are any missing columns just ignore them and proceed to any subsequent step? I came across MissingField.Ignore but it doesn't work, right?
Name | Maths Score 2 | |
abc@gmail.com | abc | 40 |
Thanks in advance!
I'd recommend using error handling like try ... otherwise in your steps.
For more detail, check out these resources:
https://docs.microsoft.com/en-us/power-query/error-handling
https://bengribaudo.com/blog/2020/01/15/4883/power-query-m-primer-part-15-error-handling
For nulls, in particular, you may also want to be aware of the coalesce operator:
https://gorilla.bi/power-query/coalesce/
Hello - are the rows from the two tables combined at any point or are you trying to create a set of transformations to be applied separately to each table?
If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.
Proud to be a Microsoft Fabric Super User
Hi @jennratten
It's all within the same table, It's just that the entire table will get updated with new data & columns however some columns might not be there like ID and Maths Score 1 but the applied steps had steps that "touches" on those "missing" columns so when i hit refresh, the applied steps will hit an error saying unable to change type because "ID" wasn't found and unable to execute bla bla because Maths Score 1 wasn't found
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
27 | |
26 | |
22 | |
12 | |
10 |
User | Count |
---|---|
25 | |
25 | |
21 | |
18 | |
12 |