Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
LucaB-1991
Contributor
Contributor

Retrieve “Year” field value from a list of “YearMonth” values

Hi everyone,

I need some help!

In qlik senso how can I extract years’values from a multiple selected YearMonth values?

For example:

If the user selects 201701, 201801,201901 from YearMonth filter box, in set analysis I want this behaviour : Year = {2017, 2018, 2019}.

Is there a way to achive this ?

Labels (2)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

You can use a variable or the expression directly in set analysis.

 = '{' & Concat(Distinct Left(YearMonth,4), ',' ) & '}'                           

 

 

View solution in original post

3 Replies
DavidM
Partner
Partner

If YearMonth is $date type field you can do it with function Year(). Or you can use just left:

Year = {"=Left( [Year] ,4)"}

tresesco
MVP
MVP

You can use a variable or the expression directly in set analysis.

 = '{' & Concat(Distinct Left(YearMonth,4), ',' ) & '}'                           

 

 

View solution in original post

LucaB-1991
Contributor
Contributor
Author

Thank you very much.
It works!