Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
hello
can someone help me please
i'm woindering if it's possible to have in a return clause multiple lignes
here is the code that i'm wrinting
Solved! Go to Solution.
Hi @Anonymous
if are you looking to pass multiple logical tests, then you can use SWITCH
columns =
SWITCH(
TRUE(),
'Product'[Color] = "Red", 1,
'Product'[Color] = "Blue", 2,
'Product'[Color] = "Black", 4,
3 --else
)
btw, your question is DAX related did you wanted to recreate it in Power Query?
Hi @Anonymous
if are you looking to pass multiple logical tests, then you can use SWITCH
columns =
SWITCH(
TRUE(),
'Product'[Color] = "Red", 1,
'Product'[Color] = "Blue", 2,
'Product'[Color] = "Black", 4,
3 --else
)
btw, your question is DAX related did you wanted to recreate it in Power Query?
hello using @Mariusz Answer here is the solution may be it will help somebody