Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

sivaboggarapu20
New Contributor III

How to display textbetween in String filed?

Hi Team,

I have filed values like below. I want to display string like 'Snapshot' values from Starting or Ending with Snapshot?

EBS:VolumeUsage

USW2-EBSSmiley FrustratednapshotUsage

EBSSmiley FrustratednapshotUsage

Thanks,

Siva

3 Replies
mwoolf
Honored Contributor II

Re: How to display textbetween in String filed?

if(index(YourField,'Snapshot')>0,'Snapshot',YourField) as YourNewField;

sivaboggarapu20
New Contributor III

Re: How to display textbetween in String filed?

Hi MW,

It doesn't filtering any data with above expression

Thanks,

Siva

sureshqv
Esteemed Contributor III

Re: How to display textbetween in String filed?

try this

script:

A:

load Test,

if(Test like '*Snapshot*', 1,0) as MyData;

load * Inline [

Test

EBS:VolumeUsage

USW2-EBSSmiley FrustratednapshotUsage

EBSSmiley FrustratednapshotUsage];

Front end:

strighttable:

Dim:Test

Exp:  count({<MyData={1}>}Test)       for   snapshot values result

count({<MyData={0}>}Test)       for non snapshot values result