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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

How to replace several values in a column for a single value (POWER BI QUERY)

Hi,

I have more than 500 different values in a column and I need to replace all of them for a single value in a new column. How can I do that easily? Is there such a function as replace all values except blank, for a unique value?

 

Thanks, RA

2 ACCEPTED SOLUTIONS
az38
Community Champion
Community Champion

hi @Anonymous 

try calculated column

Column = IF(
isBlank('Table'[Field]);blank();"YourNewValue")
)

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

az38
Community Champion
Community Champion

hi @Anonymous 

it should work

= if [Column1] = null then null else "YourValue"

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

6 REPLIES 6
Touraj
Frequent Visitor

Follow the following. Remember you need to add several entries then the system makes a rule and follows the rule.

 

 

AddColumn01.PNGAddColumn02.PNGAddColumn03.PNG

Tahreem24
Super User
Super User

Go to power query editor - -> take duplicate of your required column - -> then right on that duplicate column - -> select replace option and enter needed value of yours - -> click OK.

Please don't forget to give Kudos and accept this as a solution if it helps you.
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
az38
Community Champion
Community Champion

hi @Anonymous 

try calculated column

Column = IF(
isBlank('Table'[Field]);blank();"YourNewValue")
)

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Hi AZ38 -

How can I apply this same formula in the POWER QUERY EDITOR?

In my specific case, it would be better to do this there, by addin a Custom column.\

Pls, let me know.

Thank you. RA

az38
Community Champion
Community Champion

hi @Anonymous 

it should work

= if [Column1] = null then null else "YourValue"

do not hesitate to give a kudo to useful posts and mark solutions as solution


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

SUPER!!!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.