Forum Discussion
Macaurly
8 years agoRegular Visitor
Power Query choose a step to create based on a condition
Hello, I have managed to filter my table using Table.SelectRows so that I only show rows where a Date field lies between two dates for payroll purposes. So as a contextual example, I want to see al...
JOSELUISMTZRMZ1
2 years agoHelper I
Hello
I had the same need so here what I could do, the thing is that you have to return a table to continue in the step you are setting the If, I could figure out that: THEN let steps in result ELSE let steps in result ... in #step is how to
let
your steps
NAME_OF_STEP_WHERE_IF_NEEDED = if CONDITION
THEN
let
all your steps code for true as usual
in #END
ELSE
let
all your steps code for false as usual
in #END
here your main steps path continues or ends
in NAME_OF_STEP_WHERE_IF_NEEDED