Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

How to tell if exact value is selected ?

I need to tell if a specific value is selected, all I've seen so far is about using something like GetFieldSelections and then search for the string inside it, the problem is that I have multiple situations where one value is the substring of another value, for example :


I have the following table :


COLUMNA
-------------------

Value

Sub Value

Another Value

I want to check if the string Value is selected, but the method by checking the string will fail because it will return <> 0 if the string Sub Value is selected, and this is not what I want.


Any ideas ?

1 Solution

Accepted Solutions
MVP
MVP

Re: How to tell if exact value is selected ?

Try something like

=Count({<COLUMNA *=  {'Value'}>} COLUMNA)

This will also return a true value if you have no selections in field COLUMNA, or multiple selection including 'Value'.

You can enforce active selection of only value 'Value' using

=Count({<COLUMNA *=  {'Value'}>} COLUMNA) and GetSelectedCount( COLUMNA) = 1

2 Replies
MVP
MVP

Re: How to tell if exact value is selected ?

Try something like

=Count({<COLUMNA *=  {'Value'}>} COLUMNA)

This will also return a true value if you have no selections in field COLUMNA, or multiple selection including 'Value'.

You can enforce active selection of only value 'Value' using

=Count({<COLUMNA *=  {'Value'}>} COLUMNA) and GetSelectedCount( COLUMNA) = 1

Not applicable

Re: How to tell if exact value is selected ?

Perfect, thanks a lot, I didn't know about that *= operator.

Community Browser