cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mehal1996
Helper II
Helper II

Replace Empty with Value in Query

Hello,

 

I have a unique issue which involves a column of mine showing " " as a record - let's call it an empty record. Normally, this should show up as (null) or (blank) when the filter is dropped down, however it shows as " ". Can I replace this in any way with the text I need which is "No Solution Architect Specified"?

I've tried doing a replace values with different values to find including "null", "blank" & " " - neither of them have worked. Thanks for your help on this. Image shown below

 

Mehal1996_1-1620925388725.png

 

 

1 ACCEPTED SOLUTION
watkinnc
Solution Specialist
Solution Specialist

Oh yeah--in the Replave Values GUI dialogue, you have to check "Match Entire Cell Contents", or it will replace spaces anywhere there is one, as opposeds to the whole cell being "empty".  Sorry about that!!

--Nate

View solution in original post

5 REPLIES 5
watkinnc
Solution Specialist
Solution Specialist

You can indeed!

FixedColumn = Table.TransformColumns(Prior Step, {{"ColumnName", Text.BeforeDelimiter(_, "(")}})

--Nate

watkinnc
Solution Specialist
Solution Specialist

Oh yeah--in the Replave Values GUI dialogue, you have to check "Match Entire Cell Contents", or it will replace spaces anywhere there is one, as opposeds to the whole cell being "empty".  Sorry about that!!

--Nate

View solution in original post

That's worked a treat. Thanks! I will mark it as a solution now. 

 

Not sure if you know this one, but is it possible to natively remove the last 12 characters (in this example) within a column after the opening bracket (only if there is one), or does it have to be done through adding columns through delimiter seperations.

I just want to do it within the column if possible instead of adding new seperated columns. Thanks. 

 

Mehal1996_1-1620934720340.png

 

 

Mehal1996
Helper II
Helper II

Thanks Nate,

 

I tried this, but when I delete the previous filter step as you suggested, all other values now become an issue as I get the below. It's like it replaces the spaces with the new text. 

Mehal1996_0-1620932538859.png

 

watkinnc
Solution Specialist
Solution Specialist


Right in that screenshot, uncheck "Select All", select that "blank" value.  Next, just right click on whatever that value is, right in the table, and select "Replace Values".  Replace it with whatever you'd like.

 

Now just go the the applied steps, and delete the previous step to this one.

That's all!

--Nate

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors