Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
oakes_gco_qlik
Contributor III
Contributor III

Syntax to Concat two variables in another variable

I have three variables  vStartMM   vStartYY vSTARTMMYY within vStartmm and vStartYY I have fields which change based on selections made (they are ok). What I require is to take these two variables and concatenate them into one variable vSTARTMMYY.

Within the Variable Overview - Definition- I am using the CONCAT function. I have looked high and low for just one example that would be of use and I cannot find one - ANYONE help please.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

You can use the concatenation operator & instead to concatenate two strings:

=vStartMM & vStartYY

View solution in original post

8 Replies
alexandros17
Partner - Champion III
Partner - Champion III

LET vStartMM = ....

LET vStartYY = ...

LET vSTARTMMYY = $(vStartYY)$(vStartMM);


let me know

swuehl
MVP
MVP

You can use the concatenation operator & instead to concatenate two strings:

=vStartMM & vStartYY

oakes_gco_qlik
Contributor III
Contributor III
Author

Thank you but I am thinking this would be ok in the script but inside the variable Overview (Definition)its not working.

oakes_gco_qlik
Contributor III
Contributor III
Author

Looks like I didnt need 'concat' any way - no wonder I couldnt get it to work. This has resolved my problem. Thankyou.

oakes_gco_qlik
Contributor III
Contributor III
Author

Hi me again- I am very close to my solution just one little problem. When I concatenate the two variables (one of which is month) the value is a single digit for Jan to Sept where I need it to be two digits ie  01 for Jan up to 09 for Sept.

My selections and subsequent analysis works ok when I select Oct Nov  Dec. as they are 10   11   12.

Any suggestions??

anbu1984
Master III
Master III

Right('0'&Month_var,2)

alexandros17
Partner - Champion III
Partner - Champion III

Num(vStartMM,'00')

oakes_gco_qlik
Contributor III
Contributor III
Author

Thanks guys much appreciated.