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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ch_01
New Member

Need to convert (Yes/No) to 1/0

Hi, 

 

I have a column Churn where the values are Yes/No need to be converted as 1 & 0 (Yes=1 , No=0).Screenshot (159).png  Can anyone assist me?

1 ACCEPTED SOLUTION
ribisht17
Super User
Super User

  Hi @ch_01 

 

Refer >> How to replace values in power bi (projectpro.io)

Step 1 - Select the data for replacing

Select the columns of the values you want to replace.

Step 2 - Select the Replace Values option

Right-click on the data set in the Fields pane, click on the edit query option. This will redirect us to Power Query Editor then follow the below steps -

Transform -> Replace Values button -> Replace Values Option

Replace Yes with 1 and No with 0

Step 3 - Insert Value to find(old) and value to Replace with(new)

After you click on the Replace Values option, a small window gets open where you can replace the old value with the new value.

Step 4 - Close and apply

Click on OK in the Replace Value window, it will replace the old value with the new value. Click on the Close & Apply button in order to apply all changes.

 

Regards,

Ritesh

@ch_01

View solution in original post

2 REPLIES 2
ribisht17
Super User
Super User

  Hi @ch_01 

 

Refer >> How to replace values in power bi (projectpro.io)

Step 1 - Select the data for replacing

Select the columns of the values you want to replace.

Step 2 - Select the Replace Values option

Right-click on the data set in the Fields pane, click on the edit query option. This will redirect us to Power Query Editor then follow the below steps -

Transform -> Replace Values button -> Replace Values Option

Replace Yes with 1 and No with 0

Step 3 - Insert Value to find(old) and value to Replace with(new)

After you click on the Replace Values option, a small window gets open where you can replace the old value with the new value.

Step 4 - Close and apply

Click on OK in the Replace Value window, it will replace the old value with the new value. Click on the Close & Apply button in order to apply all changes.

 

Regards,

Ritesh

@ch_01

Thank you

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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