Forum Discussion
Lorrec
3 years agoNew Member
Power BI Column Query with Multiple Conditions
I have a Power BI dashboard that I built several years ago. I have a column in the dashboard that looks at the sixth letter in the server name. Based on it. The columns determine the environment. For...
- 3 years ago
Hi Lorrec ,
I think you could nest another if statement, like this:
Column = IF ( 'Append'[Server Name] = "serverx123", "Room1", SWITCH ( REPLACE ( LEFT ( TRIM ( 'Append'[Server Name] ), 6 ), 1, 5, "" ), "X", "Env1", "L", "Env2", "No Env" ) )Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jialluo-msft
3 years agoCommunity Support
Hi Lorrec ,
I think you could nest another if statement, like this:
Column =
IF (
'Append'[Server Name] = "serverx123",
"Room1",
SWITCH (
REPLACE ( LEFT ( TRIM ( 'Append'[Server Name] ), 6 ), 1, 5, "" ),
"X", "Env1",
"L", "Env2",
"No Env"
)
)
Best Regards,
Gallen Luo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Lorrec3 years agoNew Member
Thank you for the help. I tried something similar but could not get it to work. Your example was what I needed.