Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If char help

hi

in excel sheet in a column [Ticked_Id] i have 5 different type od data

1)   0

2)   C /CNL FEE

3)   F16071

4)   F16071/0000000241

5)   FF16071 /0000000141 24A20

first three (1,2,3 ) wont change

but  at last two (4,5) i want the code after "/" as 10 character  (0000000241)

at (4)  "/" is 7th character; at (5) "/" is 9th character after space.

how i can write this in is statement.

thanks


1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

If that is definitely the rule you want to apply then try:

LEFT(TEXT(SubField(YourField,'/',2)),10)

or

MID(YourField,Index(YourField,'/'),10)

Jason

View solution in original post

23 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Text(SubField(Ticked_Id,'/',2)) should do it.

Not applicable
Author

thanks Jason it is helpful

but this time i cant see (1,2,3) and also isee (5) as 0000000141 24A20

but i wanna see (5) as 0000000141

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Oops - my bad.  No problem - but first let me check your required output:

1)   0

2)   CNL

3)   F16071

4)   0000000241

5)   0000000141

Is this right?  Note that 2) HAS changed as it contains a / and a space.

Jason

Not applicable
Author

1)   0

2)   CNL

3)   F16071

4)   0000000241

5)   0000000141

yes this is the correct output that i want

thanks a lot

Jason_Michaelides
Luminary Alumni
Luminary Alumni

In that case try:

Text(Mid(YourField,RangeMax(Index(YourField,'/'),1),IF(Index(YourField,' ')<>0,Index(YourField,' ')-Index(YourField,'/')+1)))

(might have missed a parethesis in there somewhere...can't test it right now!)

Not applicable
Author

thanks but it turns output only

FF16071

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Hmm - maybe:

Text(Mid(YourField,RangeMax(Index(YourField,'/'),1),IF(Index(YourField,' ')>0,Index(YourField,' ')-Index(YourField,'/')+1,Len(YourField))))

Not applicable
Author

Jason thank you very much you are very helpful but this time

the output is

/0000000141 but there musnt be /

also i cant see C /CNL FEE as output

i am new to qlikview so it will be difficult for me to find the result

can you please help again.

thanks

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Text(Mid(YourField,RangeMax(Index(YourField,'/')+1,1),IF(Index(YourField,' ')>0,Index(YourField,' ')-Index(YourField,'/')+1,Len(YourField))))

The change above should sort out the / at the start. However this expression is designed to get everything between / and a space. This will translate C /CNL FEE to CNL. I warned about this above.

Jason