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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
laura_1
Partner - Contributor III
Partner - Contributor III

GetFieldSelections with automatically applied filters

Hi, 

I have a year month field ([Calendar Year Month]) , which has been set to 2 months prior to today's date using the following logic and saved as a default bookmark which automatically selects a value in this field upon opening the application:

=if([Date Flag]='Y', [Calendar Year Month])

clipboard_image_0.png

I also have a chart where I've included the following logic in the title to specify what period the chart is showing: 

=if(GetSelectedCount([Calendar Year Month])>0, 'P&L Report: ' & GetFieldSelections([Calendar Year Month]), if(GetSelectedCount([Calendar Year])>0,
'P&L Report: ' & GetFieldSelections([Calendar Year]), 'P&L Report'))

However, when I open the app (and bookmark is automatically applied), the chart title is showing: 

clipboard_image_1.png

Is there a way to make sure the title displays the actual selected month instead of bookmark logic?

1 Solution

Accepted Solutions
treysmithdev
Partner Ambassador
Partner Ambassador

Instead of GetFieldSelections, try using Concat.

 

=if(GetSelectedCount([Calendar Year Month])>0, 'P&L Report: ' & Concat([Calendar Year Month],', '), if(GetSelectedCount([Calendar Year])>0,
'P&L Report: ' & Concat([Calendar Year],', '), 'P&L Report'))

 

Blog: WhereClause   Twitter: @treysmithdev

View solution in original post

2 Replies
treysmithdev
Partner Ambassador
Partner Ambassador

Instead of GetFieldSelections, try using Concat.

 

=if(GetSelectedCount([Calendar Year Month])>0, 'P&L Report: ' & Concat([Calendar Year Month],', '), if(GetSelectedCount([Calendar Year])>0,
'P&L Report: ' & Concat([Calendar Year],', '), 'P&L Report'))

 

Blog: WhereClause   Twitter: @treysmithdev
laura_1
Partner - Contributor III
Partner - Contributor III
Author

Perfect thank you!