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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
wanyunyang
Creator III
Creator III

concat in set analysis doesn't work

Hi guys,

 

I have below formula with set analysis, but it returns null value:

Sum({<[Year]={"$(=concat(distinct [Year]-2, ', '))"}>}Qty)

 

Does anyone have any idea where the issue is? Thanks in advance!

Labels (2)
1 Solution

Accepted Solutions
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

The double quotes inside your Set Analysis values presume Search, however the concatenated list of years doesn't contain any search conditions. I think it should work better without double quotes.

I'd also challenge the condition itself. Perhaps a search for the year that's greater then the current year - 2, would be more logical?

If you want to learn more about Set Analysis, AGGR(), and other advanced development techniques, join us at the Masters Summit for Qlik in New Orleans on November 14-16.

Cheers,

Ask me about Qlik Sense Expert Class!

View solution in original post

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

The double quotes inside your Set Analysis values presume Search, however the concatenated list of years doesn't contain any search conditions. I think it should work better without double quotes.

I'd also challenge the condition itself. Perhaps a search for the year that's greater then the current year - 2, would be more logical?

If you want to learn more about Set Analysis, AGGR(), and other advanced development techniques, join us at the Masters Summit for Qlik in New Orleans on November 14-16.

Cheers,

Ask me about Qlik Sense Expert Class!
Fernando_Fabregas
Creator II
Creator II

Hi ! Did you try to eliminate double quotation marks ?

wanyunyang
Creator III
Creator III
Author

Hi Oleg,

Thank you for your reply. The formula is to see previous two year's number based on the selection, so I'm using Year-2.

The issue is the double quote. After I removed it, the formula worked fine. Thank you!