Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Contributor III

Alternate States Question

I've got a chart that compares sales pounds in one time period (alternate state BasePeriod) versus a comparative time period (alternate state ComparePeriod). That works fine but how do I get the chart to respect selections in other list boxes? For example, by using these expressions...

Expression 1 =sum({[BasePeriod]<[Country]=$::[Country]>}[Sales Pounds])

Expression 2 =sum({[ComparePeriod]<[Country]=$::Country]>}[Sales Pounds])

...the chart will respect any selections in the Country list box. But there are dozens of other dimensional fields that the users may select from (through Search, if not an actual ListBox). So how do I write the expressions so that I don't have to account for every single field the user may be making selections in? I'm hoping I don't have to write expressions that are hundreds of characters in length, listing every possible dimensional field.

Tags (2)
1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: Alternate States Question

Are the users just selecting dates?  If so you can do:

Expression 1 =sum({$<Date=[BasePeriod]::Date>}[Sales Pounds])

Expression 2 =sum({$<Date=[ComparePeriod]::Date>}[Sales Pounds])

This will make it so each expression accepts all selectors and the date will equal the date from the respective alternate state.

View solution in original post

2 Replies
Highlighted
Partner
Partner

Re: Alternate States Question

Are the users just selecting dates?  If so you can do:

Expression 1 =sum({$<Date=[BasePeriod]::Date>}[Sales Pounds])

Expression 2 =sum({$<Date=[ComparePeriod]::Date>}[Sales Pounds])

This will make it so each expression accepts all selectors and the date will equal the date from the respective alternate state.

View solution in original post

Highlighted
Contributor III

Re: Alternate States Question

Perfect, thanks!!!!