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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi guys,
I am new to Power BI, and come across this situation that I need to create a new column based on conditions of the other 4 columns. I've pasted screenshot of what the columns like down below with my further exaplanaiton.
As you can see 4 columns here and I marked then with different colours and with numbers as well.
Here is the condition from SQL server.
Bascially, I need to generate a new column (column 5) based on the conditions show in SQL. The conditions in SQL is saying if column 4 cell equals to SCA, then the new column 5 cell should use the value from column 1, and if the column 4 cell equals to OYU, then the new column 5 cell should use the value from column 3, and if the column 4 cell equals to neither SCA nor OYU, then use the the calue from column 2 for the new column 5. And after done all of that, column 1, 2 and 3 needs to be invisible.
So I was wondering if I can do this on Power BI?
Thanks in advanced.
Solved! Go to Solution.
@catpoisoncat , You can use Switch to create new column
column 5 = Switch(True() ,
[Column4] = "SCA", [Column1]
[Column4] ="OYU",[Column3],
[Column 2])
Switch-Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56
@catpoisoncat , You can use Switch to create new column
column 5 = Switch(True() ,
[Column4] = "SCA", [Column1]
[Column4] ="OYU",[Column3],
[Column 2])
Switch-Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
12 | |
11 | |
10 | |
9 |