Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using searchable expressions with alternate states

Hi,

I have a straight table set up in an alternate state, and in this table I have multiple expressions that I want to be able to search on. So i've enabled the "Searchable" option for the expressions under the Presentation tab, however it isn't working as expected.

Whenever I search for something in an expression a green dot appears on the dimension fields, indicating that a filter has been applied, but there is no reduction in the records that are being displayed. When I try this on a table that does not have an alternate state applied to it, it works fine.

Is there anything I need to do with the settings of the table or in the expressions themselves to make this option work with the alternate state?

1 Solution

Accepted Solutions
sunny_talwar

May be try this:

=Sum({[Alternate State] * <Person=$::Person>} Amount)

View solution in original post

13 Replies
kkkumar82
Specialist III
Specialist III

Hi James,

I have tried in Qv 12 SR1 by having alternate states and not to a table but when I select a value I am able to see the table getting reduced by rows.

Can we share a pic of the table when you set it to alternate states.

Kiran Kumar

Not applicable
Author

Hi,

Some pictures are attached at the bottom of this reply.

I think i've found the cause of the problem, but I don't know how to fix it. In my report I have filters that I want to be applied over multiple different alternate states. So in each of the expressions i've added in a bit to point them to the selections made in the inherited state (which the list boxes are in). The style of expression i'm using is:

=sum({<Person=$::Person>} Amount)

The first image attached shows the search filter working when the expression is just summing up the amount with no modifiers. The second one shows it not working when using the expression above, even though it is displaying that some kind of filter is applied.

Capture1.pngCapture2.png

sunny_talwar

Is your whole chart in alternate state? You specify in your expression that it needs to be filtered based on selection in inherited state for person. Why do you expect it to be filtered on the selection in alternate state then?

kkkumar82
Specialist III
Specialist III

I think you are using getfieldselections() for getting the selected values right, then use the fourth argument of this function which is the state of the field.

put the state name in ' '

sunny_talwar

May be try this:

=Sum({[Alternate State] * <Person=$::Person>} Amount)

kkkumar82
Specialist III
Specialist III

getfieldselections ( FieldName [, ValueSep [, MaxValues [, State]]])

kkkumar82
Specialist III
Specialist III

sunny what is the use of

<Person=$::Person>


this one , can you elaborate

sunny_talwar

In a chart which is in alternate state, you would expect it to only filter based on selections in an alternate state field. But in case you want it to filter based on a selection in inherited state you can use this particular syntax. Using this syntax, the expression will only filter based on selection in Person's field from inherited state. Person selection in alternate state won't filter anything.

kkkumar82
Specialist III
Specialist III

So in this case is it doing a intersection * between the Alternate state and selection in the inherited.

I mean this

{[Alternate State] * <Person=$::Person>}