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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.
Anonymous
Not applicable

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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