Forum Discussion

JamesSimison's avatar
JamesSimison
Regular Visitor
5 years ago

Spelling correction

Hi, 

 

we have found a small error in a much used data entry form, some months were shortenend and others were not, January to Jan, February to Feb etc. Before we were able to get the form fixed we were able to add a quick text replace function

 

"= Table.ReplaceValue(#"Changed Type","Jan","January",Replacer.ReplaceText,{"label"})" 

 

to fix the issue in the report side of things. Now the form has been fixed it is replacing January with Januaryuary which is not ideal. 

 

Is there any way to change the Jan and leave the January well alone 

 

Cheers

3 Replies

  • JamesSimison try this expression:

     

    Table.ReplaceValue(#"Changed Type", each [label], each if [label] = "Jan" then "January" else [label] ,Replacer.ReplaceText,{"label"})

     

    Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

    • JamesSimison's avatar
      JamesSimison
      Regular Visitor

      Cheers, I managed a work around by using the match entire cell contents in the replace values menu. I'll keep hold of this solution if the way I've used fails in the future.