Join 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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 17 | |
| 9 | |
| 9 | |
| 7 | |
| 7 |