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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sibrulotte
Creator III
Creator III

Concatenate variable and string in set analysis

Hi

so my variable vBVvirtuo has 2014 in it.

I'd like to be concatenated with -12 to give 2014-12 that would be the value set in my set analysis for the field année-période financière.

This is what I had in mind:

sum({1<[Année-période financière]= {'$(=vBVvirtuo)&'-12''}>} [Montant cumulé aad])

What am I screwing up?

1 Solution

Accepted Solutions
sibrulotte
Creator III
Creator III
Author

Hi all,

first off, I didn't need to do a make date, but I did have to create another variable.

vBVvirtuoMM = $(vBVvirtuo)&'-12'

and in my set analysis:

sum({1<[Année-période financière]= {'$(=vBVvirtuoMM)'}>} [Montant cumulé aad])

that worked.

thanks to both of you.

View solution in original post

3 Replies
Not applicable

Please create another variable like

vValue = Makedate(vBVvirtuo,12,1)

or

vValue = Date(Makedate(vBVvirtuo,12,1),'YYYY-MM')

Then use this value depending on [Année-période financière] values.

Thanks

JonnyPoole
Former Employee
Former Employee

how about this ?


sum({1<[Année-période financière]= {'$(=vBVvirtuo&'-12')'}>} [Montant cumulé aad])

sibrulotte
Creator III
Creator III
Author

Hi all,

first off, I didn't need to do a make date, but I did have to create another variable.

vBVvirtuoMM = $(vBVvirtuo)&'-12'

and in my set analysis:

sum({1<[Année-période financière]= {'$(=vBVvirtuoMM)'}>} [Montant cumulé aad])

that worked.

thanks to both of you.