Skip to Content
avatar image
Former Member

I want to extract the postcode from a String.

Hi All

Where length of string in variable still should be able to extract postcode.Ex-9 Pilton Close,Nine Elms,Swindon,SN5 5PF then output of variable in WEBI Report should be SN5 5PF also lenght of Postcode is different and actually need a formula where we can identify last occurrence of comma

Please Help ME :(

Thanks In Advance

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 22, 2017 at 12:19 PM

    try with below steps.

    Create Var=Right([Address];Pos([Address];",")-1)

    Final variable=Substr([Var];Pos([Var];",")+1;Length([Var]))

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Sir,

      Thanks A lot.

      But it is giving last two strings like Swindon,SN5 5PF and i want only postcode so where i need to do more filterations?

  • Dec 22, 2017 at 12:06 PM

    Hi,

    check out my blog:

    https://blogs.sap.com/2017/08/18/how-to-create-a-search-engine-in-webi/

    you will need the formula POS this one gives information about the specific place of a certain char in a string

    Grtz

    Koen

    Add comment
    10|10000 characters needed characters exceeded