Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to create two filter panes that have the same values in each, but when one value is selected in pane one, it is removed from pane 2. The goal is to be able to compare the selections in a line graph referencing the individual filter panes.
The images below show the functionality I'm looking for. I have this somewhat working using a "match" table where I compare the selections of the first filter pane and then limit the selections of the second, but for some reason selecting anything in the second table makes everything selected in the first.
LOAD * INLINE [
GROUPMATCH;GROUP B
!;!
Community;Tertiary
Community;Quaternary
Tertiary;Community
Tertiary;Quaternary
Quaternary;Community
Quaternary;Tertiary
Community, Tertiary;Quaternary
Community, Quaternary;Tertiary
Tertiary, Quaternary;Community
Community, Tertiary, Quaternary;!
](delimiter is ';';
I'm hoping there is an easier way to accomplish this!
I'm not quite sure what you are trying to reach but linked fields are associated to each other and any selection will impact the other side directly.
To create comparing views you may use the feature of alternates states - which means the related objects are set to different (selection) states.
Another approach is to use unrelated fields and then referencing within the expressions to those selections. This might be done with something like:
t: load text(fieldvalue('Dim', recno())) as DimX autogenerate fieldvaluecount('Dim');
and then in the expressions:
sum({< Dim = p(DimX)>} Value)
I had previously tried different states, but found an example on here of doing a comparison without using states that simplified the entire dashboard. I'm trying to find a way to get the opposite of getfieldsselected([GROUP A]) and then populate [GROUP B] with those options. If someone selects Community in Group A, I don't want it to be selectable in group b. I've tried setting getfieldsselected([GROUP A],',',0) so that I would get the "NOT" return values, but it only returns the string "1 of 3" or "2 of 3" or "ALL".
I tried an expression
=IF(GetFieldSelections([GROUP A])=[GROUPMATCH],[GROUPB],null())
which allows the functionality above, but when you select anything for group B, it automatically selects it for group A.
I've seen you post in a different thread about p() and e() functions in set analysis, but since nothing is being aggregated in any way, I wasn't sure how to write that.
Solved: About GetFieldSelections - Qlik Community - 2142686
I mentioned the alternate states only because they are a native feature for such tasks but I'm not sure if they have a general benefit from an overall point of view because this simplifying leads to more complexity by other requirements.
Like mentioned - related fields will interact by selections with each other and impacting this behaviour in any customized way is quite hard to impossible. More common are attempts to control and/or to synchronize the selections from partly-related fields with any kinds of actions - to cure unsuitable data-models, for example by having n fact-tables with different date-fields which should synchronized selected from a single field. This kind of measurement is possible but not trivial and with serious disadvantages in regard to the performance and usability.
Therefore don't try to set/adjust any selections else Let the User Select - Qlik Community - 1463978. This doesn't mean that no advanced views are possible else with the above shown p() and e() functions it's very easy to reference within the expressions of the objects (which are always aggregations in the sense of group by in regard to the applied object-dimensions) to the selections. p() and e() are similar to the getfieldselections() but simpler to use (the return isn't a string-array of values which may need some quotes adjustment within the call else an index-reference to the field-value) and much more powerful because they could be nested with further set analysis conditions (by the way - within the user/document-settings or within the third parameter of getfieldselections() the number of the returning values could be adjusted - to avoid the ALL or Not or n of n).
The above shown example of an independent duplicated field might be used for two charts in parallel - one with:
sum({< Dim = p(DimX)>} Value)
as expression and the other one with:
sum({< Dim = e(DimX)>} Value)
and then both charts will react directly react on the made selections - and showing here the excluded results to each other. Of course more complex scenarios are thinkable especially if you hasn't a single independent field DimX else also a DimY ...