Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.

1 Solution

Accepted Solutions
jpapador
Partner - Specialist
Partner - Specialist

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
jpapador
Partner - Specialist
Partner - Specialist

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.

Anonymous
Not applicable
Author

Perfect, thanks!!!!