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

Alternative states - same selections except for one field

This seems like it should be easy but couldn't find any good examples in community.

I have a bar chart and I want to use alternative state (Scenario 1) on it. It has two dimensions and one expression. I want all selections to be honored expect in the inherited state except for one field - I have a list box and alternate state (Scenario1) selected for this list box. If my current expression is simple like:  Sum(Claims) - how do I change this so it will filter only if something in the alternate state (Scenario1) list box is selected.

Note: I also selected alternate states (Scenario1) for this bar chart ,

Thanks,

Zag

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You want to honor all selections from the inherited state except for the one field ("myfield")?

sum({[Scenario 1] * <[myfield]=>} Claims)

You want to use the [Scenario 1] "myfield" selections only if something is selected in [Scenario 1] "myfield"?


GetSelectedCount([myfield],False(),'Scenario 1')>0

,sum({[Scenario 1] * <[myfield]=>} Claims)

,sum(Claims)

)


-Rob

http://masterssummit.com

http://qlikviewcookbook.com


View solution in original post

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You want to honor all selections from the inherited state except for the one field ("myfield")?

sum({[Scenario 1] * <[myfield]=>} Claims)

You want to use the [Scenario 1] "myfield" selections only if something is selected in [Scenario 1] "myfield"?


GetSelectedCount([myfield],False(),'Scenario 1')>0

,sum({[Scenario 1] * <[myfield]=>} Claims)

,sum(Claims)

)


-Rob

http://masterssummit.com

http://qlikviewcookbook.com


zagzebski
Creator
Creator
Author

Thanks Rob. Appreciate it.