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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP

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
MVP
MVP

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
Please close the thread by marking correct answer & give likes if you like the post.
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
MVP

Just taking a subfield-information maybe like this:

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

- Marcus