Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
adityakesavkoll
Contributor
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

Hi Aditya:

Hope the attached App would help.

Thanks,

Narasimha K

View solution in original post

5 Replies
Not applicable

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

Regards,

P.Prasath

Not applicable

Hi Aditya:

Hope the attached App would help.

Thanks,

Narasimha K

adityakesavkoll
Contributor
Contributor
Author

Thanks for the solution.

-Aditya

adityakesavkoll
Contributor
Contributor
Author

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

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