+ Reply to Thread
Results 1 to 4 of 4

Power Query try otherwise with text replace

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    613

    Power Query try otherwise with text replace

    Hi,
    I have managed to get what I was after by using an if else with Value . type,

    Please Login or Register  to view this content.
    So the above works where ON is a table of two columns containing old and new values, for text but give an error for numbers, so I revised this to ;

    Please Login or Register  to view this content.

    But I wanted to use try / otherwise in the first example , but could not get this to work, is it possible? I was trying to use after the accumlator variable function so
    (S,C)=> try etc.

    I've attached workbook with the above

    Richard
    Attached Files Attached Files

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Power Query try otherwise with text replace

    Quote Originally Posted by Dicken View Post
    I was trying to use after the accumlator variable function so
    (S,C)=> try etc.
    That would only work if the Table.ReplaceValue operation itself failed, which is not what is happening here.
    Rory

  3. #3
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    613

    Re: Power Query try otherwise with text replace

    Thanks, apart from your previous help re custom replacer, are there other ways around this, I have not been able to find anything.

    Thanks for the help, I tried a mixed text / number replacement,

    Please Login or Register  to view this content.
    Richard.

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Power Query try otherwise with text replace

    You could use try...otherwise instead of your Value.Type test, but I don't really see the point.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How can I replace invisible characters in Power Query?
    By Zero-Sama in forum Excel General
    Replies: 7
    Last Post: 11-16-2023, 03:20 AM
  2. Replies: 5
    Last Post: 10-31-2023, 11:12 AM
  3. Replace formula using power query
    By Jclarka in forum Excel General
    Replies: 1
    Last Post: 09-12-2022, 06:42 PM
  4. [SOLVED] Replace duplicates with null by power query
    By siddiqsh in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-20-2020, 04:38 AM
  5. [SOLVED] Append and replace in Power Query
    By punter in forum Excel General
    Replies: 3
    Last Post: 04-08-2020, 01:25 AM
  6. Power Query to replace macros
    By lynnsong986 in forum Excel General
    Replies: 9
    Last Post: 11-12-2019, 10:39 AM
  7. Power Query - Replace If Text is Found
    By brent_milne in forum Excel General
    Replies: 1
    Last Post: 10-25-2018, 11:00 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1