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.
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êsCovering 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 |
---|---|
107 | |
98 | |
77 | |
66 | |
53 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |