Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Like this?
The above table has no dimension and two expressions. PFA the sample qvw for reference.
Best,
Sunny
Hi Marco,
This is almost there!
How can I get it to work in a way that if nothing is selected in Outcome List Box, neither expression is shown.
Then if someone selects Passed it displays the line for that.
If someone selects Failed it displays that line in the chart.
And if someone selects both it displays both lines.
Any ideas?
Try these two conditions:
Exp1: =GetSelectedCount(Outcome) > 0 and WildMatch(GetFieldSelections(Outcome), '*Passed*')
Exp2: =GetSelectedCount(Outcome) > 0 and WildMatch(GetFieldSelections(Outcome),'*Failed*')
Also attaching MarcoWedel's sample with the edits.
HTH
Best,
Sunny
Hi Sunindia,
Could another filter in the same expression affect it?
I can see your great example working and get the logic. However in my same expression I also have another filter like:
GetFieldSelections(StudentType)='Z1'
StudentType being another list box where it contains Z1 or Z2 as possible values.
What happens once I tried your idea is that it filters fine for Passed, it shows both Passed and Failed if I only select Failed, and if I select both Passed and Failed it shows both. So it seems it has a toggle issue somewhere 😕
The idea being that they must select a student type and Outcome (Passed or Failed or both).
Not entirely sure what is the third condition you just added. Do you have a sample you can share? or may be explain it again step by step?
Best,
Sunny
to show no expressions if no selections are made, another solution could be:
=Alt(WildMatch(GetFieldSelections(Outcome), '*Passed*'),0)
hope this helps
regards
Marco