cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aznariy
Advocate I
Advocate I

PowerBi Desktop => Unable to use wildcard character in Replace Values modal window

I'm unable to use wildcard characters when changing the values in a column.

Unable to add the screenshot from my local machine to describe the issue more properly (what does the Source text field mean in the pop up?). 

 

Steps to reproduce:

 

  1. Launch PowerBi Desktop (2.64.5285.741 64-bit (November 2018)
  2. Get you data (can be .csv or excel)
  3. Open Power Query Editor
  4. Click on Transform tab
  5. Click on Replace Values drop down
  6. Place  5/*/2018 *  into the Value To Find text field
  7. Place MAY-18 in Replace With text field
  8. Click on OK button
  9. Observe that no data change happens

 

Please advise if this is a bug or there is  a different syntax for using wildcards. 

 

1 ACCEPTED SOLUTION
v-qiuyu-msft
Community Support
Community Support

Hi @aznariy,

 

You can write Power Query below: 

 

= Table.ReplaceValue(#"Changed Type",each [C1],each if Text.StartsWith([C1],"5/") and Text.EndsWith([C1],"/2018") then "MAY-18" else [C1],Replacer.ReplaceValue,{"C1"})

w4.PNG

 

You can refer to attached pbix file. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
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

2 REPLIES 2
v-qiuyu-msft
Community Support
Community Support

Hi @aznariy,

 

You can write Power Query below: 

 

= Table.ReplaceValue(#"Changed Type",each [C1],each if Text.StartsWith([C1],"5/") and Text.EndsWith([C1],"/2018") then "MAY-18" else [C1],Replacer.ReplaceValue,{"C1"})

w4.PNG

 

You can refer to attached pbix file. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
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

I can follow this answer to a certain extend but when I open the advanced editor in my sheet where am I suppose to add the 

replacement code and how did you get the C1 label to ID the column?

= Table.ReplaceValue(#"Changed Type",each [C1],each if Text.StartsWith([C1],"5/") and Text.EndsWith([C1],"/2018") then "MAY-18" else [C1],Replacer.ReplaceValue,{"C1"})

  

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!