Forum Discussion

MusterBuster's avatar
MusterBuster
Regular Visitor
8 years ago
Solved

Extract a Location Name from ugly data

Hi everyone,   I have some nasty, ugly data courtesy of a Trustpilot review export. I need to find a way to identify which specific store a customer review refers to, however the data from Trustpil...
  • Greg_Deckler's avatar
    8 years ago

    This is very brute force:

     

    Column = 
    VAR underscore1 = FIND("_",[Reference ID],1,0)
    VAR string1 = MID([Reference ID],underscore1+1,LEN([Reference ID])-underscore1)
    VAR underscore2 = FIND("_",string1,1,0)
    VAR string2 = MID(string1,underscore2+1,LEN(string1)-underscore2)
    VAR underscore3 = FIND("_",string2,1,0)
    VAR string3 = MID(string2,underscore3+1,LEN(string2)-underscore3)
    RETURN SUBSTITUTE(string3,"_"," ")