Forum Discussion

villa1980's avatar
villa1980
Resolver II
1 year ago
Solved

If, Text.trimstart and text.end not working in Formula

Hi all,  I have the below custom column I would like added, however, I am getting a 'Token ',' expected error showing.  Any ideas what simple thing I am doing wrong 🙂   Text.TrimStart ( Text.Co...
  • Cookistador's avatar
    1 year ago

    Hi villa1980 

    you forgot the if clause

     

    The following code should work 🙂

    Text.TrimStart(
        if Text.Contains([POS PARENT DIVISION NAME], "Area ")
        then Text.End([POS PARENT DIVISION NAME], 2)
        else "99"
    )