Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
zagzebski
Contributor

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
MVP & Luminary
MVP & Luminary

Re: Alternative states - same selections except for one field

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
MVP & Luminary
MVP & Luminary

Re: Alternative states - same selections except for one field

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

zagzebski
Contributor

Re: Alternative states - same selections except for one field

Thanks Rob. Appreciate it.