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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
felix18807
Contributor III
Contributor III

Concatenated list of previous selection or "All" using set analysis?

I have a text box that displays the list of current selections next to a chart. The syntax I use is below. The key thing this also does is state "All" if the field is has no selections. What I want to do is do exactly the same but with the previous selection. I feel this should be possible using set analysis but thus far I have been unsuccessful in producing this effect.

Has anyone achieved anything like this?

 

=

if(isnull(GetFieldSelections(NodeName)),

'Current Group ' &
chr(10) &
'‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾' &
chr(10) &
'All',


'Current Group ' &
chr(10) &
'‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾' &
chr(10) &
chr(183) & Capitalize(Concat(Distinct NodeName

, chr(10) & chr(183))))

1 Reply
felix18807
Contributor III
Contributor III
Author

Argh just tried this

 

=

if(Count

({$1}NodeName)=Count({$1<NodeName=>}NodeName)
,
'Previous Group ' & chr(10) &
'‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾' & chr(10) &
'All',

'Previous Group ' & chr(10) &
'‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾' & chr(10) &
chr(183) & Capitalize(Concat(Distinct {$1}NodeName, chr(10) & chr(183))))

And it seems to work....