Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
Not applicable

Removing prefix from expression

Hello,

I have a dimension with the following expression:

Arrangement

now how this comes out in the chart is such as this:

023 Hotel services

4122 Flight services

482a Transport services

My question is, how should I edit the expression to remove the numbers, letters and the empty space in front of the arrangement names? All names have a three to four character prefix with numbers, but the fourth character can be a letter. To get a result like this:

Hotel services

Flight services

Transport services

Many Thanks!

1 Solution

Accepted Solutions
Not applicable

Removing prefix from expression

Hi,

You can use the next expression:

=mid(Arrangement,findoneof(Arrangement,' ')+1,len(Arrangement)-findoneof(Arrangement,' '))

Succes!

3 Replies
olafjoppe
New Contributor III

Removing prefix from expression

Try this:

LOAD

  Mid([Arrangement], (Index([Arrangement], ' ', 1) + 1)) as [Arrangement]

  ...

Not applicable

Removing prefix from expression

Hi,

You can use the next expression:

=mid(Arrangement,findoneof(Arrangement,' ')+1,len(Arrangement)-findoneof(Arrangement,' '))

Succes!

SunilChauhan
Esteemed Contributor

Removing prefix from expression

use one of below

subfield(yourfieldname,' ',2)  as yournewfieldname in  script or

subfield(yourfieldname,' ',2) in expression

or

subfield(yourfieldname,' ',2) in calculated dimension