Qlik Community

App Development

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

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
vaibhavb
Contributor
Contributor

Single Quote in Set Expression in qliksense

Hi, I am new to Qliksense, I have string like :- 

2019-2020,2018-2019,2017-2018

I want to convert to following format :- 

'2019-2020','2018-2019','2017-2018'

Could you please let me how to achieve this in set expression.

1 Solution

Accepted Solutions
sunny_talwar

You can try this

=Chr(39) & GetFieldSelections(FiscalYear, Chr(39) & ',' & Chr(39), 1000) & Chr(39)

But why do you need this? Are ignoring all selections and are looking to allow selection in just FiscalYear? If that is the case, may be you need this

Count({1<FiscalYear = p(FiscalYear)>} Measure)

View solution in original post

3 Replies
Andy_ASDF
Partner
Partner

Not sure if i understand your question correctly, but i would try: 

 

Sum({<Column = {'2019-2020','2018-2019','2017-2018'}>} YourValue)

 

vaibhavb
Contributor
Contributor
Author

Thanks Andy for quick response,

  What actually i want is, I have Filter Pane of Fiscal Year(Financial Year) and i can select multiple years at time(Attached Image - img_20200224.png).

After selecting Multiple years, Using GetFieldSelections(FiscalYear) i am getting value like : - 

 2019-2020,2018-2019,2017-2018

Please find attached image for the same (img_20200224(1).png)img_20200224(1)img_20200224(1)

Now i want to convert the output to following format using set expression :- 

'2019-2020' , '2018-2019' , '2017-2018'

If any please let me know.

 

 

 

sunny_talwar

You can try this

=Chr(39) & GetFieldSelections(FiscalYear, Chr(39) & ',' & Chr(39), 1000) & Chr(39)

But why do you need this? Are ignoring all selections and are looking to allow selection in just FiscalYear? If that is the case, may be you need this

Count({1<FiscalYear = p(FiscalYear)>} Measure)