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.
Hey all,
So I'm basically trying to get the answer @th3h0bb5 never got: https://community.powerbi.com/t5/Desktop/Powerquery-Multiple-actions-in-IF-statement/td-p/1086609. Or @jthomson for that matter: https://community.powerbi.com/t5/Desktop/If-statement-multiple-actions/m-p/360729#M162818.
I want to have an if statement where the then and else contain two (or more) actions, so following the following pattern:
if a = b
then
do action 1
do action 2
else
do action 3
do action 4
I read somewhere that should be possible by using let ... in however Power Query treats it like a function rather than performing the actions, asking me for a parameter ( _ (optional) )
= each if Text.StartsWith([Factuurnummer], "VND")
then
let
#"Invoked Custom Function1" = Table.AddColumn(#"Added Conditional Column", "11", each "1"),
#"Expanded Abonnementskosten" = Table.AddColumn(#"Invoked Custom Function1", "12", each "2")
in
#"Expanded Abonnementskosten"
else
let
Test = Table.AddColumn(#"Added Conditional Column", "Abonnementskosten", each "test")
in
Test
Hi @sjorshijgenaar ,
I'm calling out to one of the best super users on M language that can help you out.
@ImkeF can you help gving a path to have this working.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThis 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 |
---|---|
65 | |
63 | |
52 | |
37 | |
36 |
User | Count |
---|---|
82 | |
66 | |
61 | |
46 | |
45 |