Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Delimiter problem?

Hi Friends

       I have field name like QVG-AMP-AHF

       so i want extract AMP from Above Field Name.

i have used the Function Subfiled(QVG-AMP-AHF,'-',1)

but  i am getting  only QVG.

Please help me

Thanks in Advance

Suresh

6 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     param 1 is to fetch the first one,here you need to use it as 2

     Subfiled(QVG-AMP-AHF,'-',2)

Celambarasan

Not applicable
Author

Thanks celambarasan

if i have feild name QVG-AMP means .i have to use Subfield(QVG-AMP,'-',1),

then i will get AMP

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     No.Still you will get QVP only.

     Subfield() splits the given string to separate values by using the given delimiter and according to the value(third param) you given it will fetch corresponding value.

     Example:

     QVP-AMP-AHF splitted QVP,AMP,AHF.

     if you specified as 1 then returns QVP,for 2 AMP,for 3 AHF.

     By default it will be 1 if you didn't specified.

Celambarasan

Not applicable
Author

you are right.

for getting AMP,.i have to use Subfield(QVG-AMp,'-',-1)

instead of 1, i have to use -1

.now i got the Answer

Thanks for your reply

CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Yes if you -1 also you will get answer.

     Mostly its easy to use 2 which is easier for our understanding like 1 is to get first value,2 is to get second value...

     In that case you have to imagine as 0 is to get first value,-1 is to get second value,-2 is to third value...

     Subfield(QVG-AMp,'-',2)

Celambarasan

Not applicable
Author

and simply using:

Subfield(QVG-AMP-AHF,'-')