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
HamidBee
Power Participant
Power Participant

Cleaning Data, Fill Down

I'd kindly like to ask how to remove the dates from the this column so that they are blank and then replace the blank cells with the region by filling down. So basically the dates should be replaced with the area names above.

 

Power Query.png

Thanks in advance.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @HamidBee ,

 

Please try the following formula to directly tranform the column instead of adding a new custom column:

  #"Transformed Column"= Table.ReplaceValue(Table.TransformColumns(#"Changed Type",{"Column1",each Text.Remove(_,{"0".."9"})}) ,"//",null,Replacer.ReplaceValue,{"Column1"} ),

Eyelyn9_0-1639549336130.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
Anonymous
Not applicable

Hi @HamidBee ,

 

Please try the following formula to directly tranform the column instead of adding a new custom column:

  #"Transformed Column"= Table.ReplaceValue(Table.TransformColumns(#"Changed Type",{"Column1",each Text.Remove(_,{"0".."9"})}) ,"//",null,Replacer.ReplaceValue,{"Column1"} ),

Eyelyn9_0-1639549336130.png

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for your response. I'll give this ago and see how I Find it. My manager showed me a quick way to di it in Excel. Create a column numbered from one to however many rows you have. Sort the dates/string column by alphabetical order. The dates will all be grouped together, delete the dates and then sort again by the new ID column you created. It may be better in this instance to clean it in Excel just because the data set could be large. Having said that I really like your solution, I wish I could one day get to that level of coding. 

Anonymous
Not applicable

How I would do it

1) make an extra helping column, depicting the rows with dates:

Add conditional column (Helpcolumn) > if column1 contains "/" Then null Else OK

2) add an extra column with the correct contents

Add Conditional column (Cleaned): if Helpcolumn equals OK Then Column1 Else Helpcolumn

 With the last statement you just grabbed the normal information from your first initial column (Aberdeen etc) and gave null (blank values) when it's a date.

Now, if you select the output column (Cleaned) and then hit Fill > Down, it should do exactly what you requested.

 

RubenVL_0-1639315204161.png

to

RubenVL_1-1639315239551.png

 

Cheers

Thank you for the help.

This is a good method and I think there may be a few ways to do it like this. I was however trying to find a way to do it without creating any columns although I'm not sure that it's possible. 

bcdobbs
Community Champion
Community Champion

Have you tried the column from example in power query?

 

Type the region names as they are next to a few regions and delete any attempt to replicate a date. If it looks like it works, inspect the M expression it writes for you.



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

Could you please explain some of the steps I'm not quite sure what to do here.

 

Thanks

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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