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
Dear All,
i have the following table:
| Fruit | City | Preferred |
| Banana | NY | 0 |
| Kiwi | null | null |
| Apple | Rome | 1 |
| Orange | null | null |
| Grape | Philly | 0 |
I need to create a conditional column for which: IF City = null THEN City where Preferred = 1 ELSE City
Desired result as follows:
| Fruit | City | Preferred | NEW COLUMN |
| Banana | NY | 0 | NY |
| Kiwi | null | null | Rome |
| Apple | Rome | 1 | Rome |
| Orange | null | null | Rome |
| Grape | Philly | 0 | Philly |
Thank you a lot
gianmarco
Solved! Go to Solution.
@gianmarco , If this is the data then this column formula should work:
@gianmarco , If this is the data then this column formula should work:
Just a question to give you the best logic and solution. When Preferred = 1 the expected outcome should always be "Rome" or are you expecting other cities as well?
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 33 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 90 | |
| 78 | |
| 66 | |
| 65 |