Qlik Community

App Development

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

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
zwilson_borg
Contributor III
Contributor III

Dynamic String Find in Field - Frontend Calculation

I'm looking for a way to dynamically search a field on the front end to see if all the values have a shared sequence. I don't want to provide it to search but rather it is found dynamically. For example, if I had the below data and the application is filtered to 'A' on [Grp] it would return 'SMTH - ' but unfiltered it would return '' or Null().

 

Grp | Text Value

  A   |  SMTH - 1E

  A   |  SMTH - 2W

  B  |   WPQV - 2A

  B  |  5N

  

Thanks in advance for your help/thoughts.

1 Solution

Accepted Solutions
marcus_sommer
MVP & Luminary
MVP & Luminary

Just taking a subfield-information maybe like this:

If(GetSelectedCount(Grp)=1, Concat(Distinct subfield([Text Value], ' - ', 1), ','), '')

- Marcus

View solution in original post

3 Replies
MayilVahanan

Hi,

Do you want to display the text value in the KPI? 

If so, try like below

=If(GetSelectedCount(Grp)=1, Concat(Distinct [Text Value], ','), '')

Thanks & Regards,
Mayil Vahanan R
zwilson_borg
Contributor III
Contributor III
Author

Mayil,

I need it to return the substring that is shared across each possible value in the field. In the example, I need the KPI box to just show 'SMTH - '. Your expression instead returns 'SMTH - 1E,SMTH - 2W'

marcus_sommer
MVP & Luminary
MVP & Luminary

Just taking a subfield-information maybe like this:

If(GetSelectedCount(Grp)=1, Concat(Distinct subfield([Text Value], ' - ', 1), ','), '')

- Marcus

View solution in original post