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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jblomqvist
Specialist
Specialist

How can I do GetFieldSelections to work for multiple values?

Hi all,

In a Straight table I a have two expressions.

I also have a List Box called Outcome with two values, Passed and Failed.

Expression 1 calculates when Outcome field has Passed selected.

Expression 2 calculates when Outcome field has Failed selected.

I am doing this using Conditional option in Expressions tab.

For expression 1 its: GetFieldSelections(Outcome)='Passed'

For expression 2 its: GetFieldSelections(Outcome)='Failed'

How can I get both expression 1 and expression 2 fields to show when the user selects both Passed and Failed in the Outcome List Box?

Any suggestions would be great

15 Replies
sunny_talwar

Try this:

Expression1 condtion

SubStringCount(Concat(DISTINCT Outcome, '|'), 'Passed') = 1

Expression2 condtion

SubStringCount(Concat(DISTINCT Outcome, '|'), 'Failed') = 1

HTH

Best,

Sunny

jblomqvist
Specialist
Specialist
Author

Hi sunindia,

I still get just one column showing when I select both Passed and Failed as values from the Outcome list box.

How does this expression work so maybe I can fix it?

settu_periasamy
Master III
Master III

one more solution

Exp1:

GetFieldSelections(Outcome)='Passed' or GetSelectedCount(Outcome)>1

Exp2:

GetFieldSelections(Outcome)='Failed' or GetSelectedCount(Outcome)>1

sunny_talwar

I don't see why it wouldn't work. Please see a sample qvw attached.

HTH

Best,

Sunny

maxgro
MVP
MVP

exp1 condition

wildmatch(concat(Outcome), '*Passed*')

or this

wildmatch(concat(Outcome), '*Passed*') and GetSelectedCount(Outcome)>0

settu_periasamy
Master III
Master III

Hi,

sunindia expression is working, may be you can check your outcome data (case sensitive) like passed or Passed.

sunny_talwar

That's true. Case sensitiveness can be resolved by using capitalize function

Expression1 condtion

SubStringCount(Concat(DISTINCT Capitalize(Outcome), '|'), 'Passed') = 1

Expression2 condtion

SubStringCount(Concat(DISTINCT Capitalize(Outcome), '|'), 'Failed') = 1

MarcoWedel

Hi,

another solution could be:

QlikCommunity_Thread_171266_Pic1.pngQlikCommunity_Thread_171266_Pic2.pngQlikCommunity_Thread_171266_Pic3.png

QlikCommunity_Thread_171266_Pic4.png

hope this helps

regards

Marco

jblomqvist
Specialist
Specialist
Author

Hi guys,

Thank you for your reply. This example is correct however what I realised is my Straight Table is a dimensionless chart.

It is only using expressions and the Horizontal option in Presentation to put labels next to the expression.

Any idea how I can do this with this setup?