Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
sccoleman1189
Helper I
Helper I

Change value based on value in other column

New to the Power BI world..

 

I am looking to create a new column that takes the value from another column if the column has a specific value.

 

Example:

 

If the home_station column has the name XYZ I would like my new column to return the value from the work_station. If the value is not XYZ, then I want to keep the value from from home_station. Please see example below

 

 

power bi.JPG

1 ACCEPTED SOLUTION
Diegoctn
Frequent Visitor

Column = if(PBI_Report[HOME_STATION]="XYZ",PBI_Report[WORK_STATION],PBI_Report[HOME_STATION])
 
Just change the PBI_Report with your report's name. 

View solution in original post

3 REPLIES 3
Diegoctn
Frequent Visitor

Column = if(PBI_Report[HOME_STATION]="XYZ",PBI_Report[WORK_STATION],PBI_Report[HOME_STATION])
 
Just change the PBI_Report with your report's name. 

Thank you. Now, one question, if there are multiple values I want to change do I include "and,if" and if so how do I set that up? Been working on that and its not working

Anonymous
Not applicable

HI @sccoleman1189,

 

Maybe you can try to use 'in' operator to handle multiple values.

OR Condition=
IF (
    PBI_Report[HOME_STATION] IN { "XYZ", "MNO" },
    PBI_Report[WORK_STATION],
    PBI_Report[HOME_STATION]
)

AND Condition =
IF (
    PBI_Report[HOME_STATION] = "XYZ"  && PBI_Report[BU] = "XXX",
    PBI_Report[WORK_STATION],
    PBI_Report[HOME_STATION]
)

 

Reference links:

The IN operator in DAX

 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors