Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

adityakesavkoll
New Contributor

append strings to create fieldname

I have columns like TOT_SLS_DLR, PUBLIC_SLS_DLR, PRIV_SLS_DLR,etc..

There is a list box which assigns the value 'TOT_' , 'PUBLIC_' and 'PRIV_' to a variable say v1.

I need to use something like sum($(v1)&'SLS_DLR') in my expression. How can we do this??

(assigning 'SLS_DLR' to another variable will not work in my case.)

Thanks in advance

-Aditya

1 Solution

Accepted Solutions
Not applicable

Re: append strings to create fieldname

Hi Aditya:

Hope the attached App would help.

Thanks,

Narasimha K

5 Replies
Not applicable

append strings to create fieldname

you can try like this sum($(v1)) & 'SLS_DLR'

Regards,

P.Prasath

Not applicable

Re: append strings to create fieldname

Hi Aditya:

Hope the attached App would help.

Thanks,

Narasimha K

adityakesavkoll
New Contributor

append strings to create fieldname

Thanks for the solution.

-Aditya

adityakesavkoll
New Contributor

append strings to create fieldname

Hi Narsimha

Is there a way to use the variablename or fieldname('=Type' in case of your qvw) in between two strings??

Ex.  $(=Type&'_SLS_AMT')  ->This is what we have used right now.

I need something like  ->  $('LCK_'&Type&'_SLS_AMT')

Not applicable

Re: append strings to create fieldname

Hi Aditya:

See the attached QVW.  Hope that helps.

I think you are missing an equl sign before left parenthesis, your expression should be -   $(='LCK_'&Type&'_SLS_AMT')

Thanks,

Narasimha K

Community Browser