Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Is it possible to have a 3rd alternative state to include both alternate state 1 and 2.
Example, I have cars sold ytd with a set of filters (s1) and a pipeline of cars to be sold for the rest of the year with separate filters (s2), I am looking to create a 3rd Alternative state to include salesperson, so when I select the sales person both s1 and s2 will match the salesperson selected in s3.
All help appreciated.
I think this is what you are looking for:
- Use the Salesperson list box in the Default state, or in a separate state AS3.
- in your chart expressions that show metrics for AS1 and AS2, add another modifier that enforces the selection of the Salesperson from AS3. Something like this:
sum({AS1<SalesPerson=P({AS3} SalesPerson)>} CarsSold)
In this expression, the aggregation is performed over the data defined by Alternate State AS1, while the Salesperson selection is driven by the available values of the SalesPerson in AS3.
Or, as Stephan suggested:
sum({AS1<SalesPerson=AS3::SalesPerson>} CarsSold)
This time, you assign the selected values from AS3. The difference between the two expressions is very subtle.
cheers,
Oleg Troyansky
QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense
You can use the scope operator :: to mix states in set analysis.
For example:
=Sum( {s1<salesperson = s3::salesperson>} Value)
considers alternate state s1 in general, but assigns the s3 selected salesperson to salesperson in state s1.
Hi swuehl,
Thanks for the note. I've never heard of the scope operator, so something new to learn.
I want the multi box dropdpwn by salesperson (s3) to include this scope operator, where do I use this expression you suggest? Under Multi Box Properties -> 'Sort' and 'Expression'?
No, probably not under 'expression' in sort tab. Not really sure what you want to achieve, though.
Could you upload a small sample QVW that demonstrates your setting and what you want to achieve?
Hi swuehl,
I have 2 sections:
What I am looking for is to create a list box, that when selected, will apply to both sections.
What do you mean with 'section'? A chart?
As I tried to explain above, you can create a mixup of states (e.g. your Alternate State 1 that you first section uses with the default state / another alternate state that your list box is set to) in your aggregation using set analysis.
Alternatively, you can think about copying the list box selections to the appropriate fields in Alternate State 1 and 2 using field event trigger and select in field actions.
I think this is what you are looking for:
- Use the Salesperson list box in the Default state, or in a separate state AS3.
- in your chart expressions that show metrics for AS1 and AS2, add another modifier that enforces the selection of the Salesperson from AS3. Something like this:
sum({AS1<SalesPerson=P({AS3} SalesPerson)>} CarsSold)
In this expression, the aggregation is performed over the data defined by Alternate State AS1, while the Salesperson selection is driven by the available values of the SalesPerson in AS3.
Or, as Stephan suggested:
sum({AS1<SalesPerson=AS3::SalesPerson>} CarsSold)
This time, you assign the selected values from AS3. The difference between the two expressions is very subtle.
cheers,
Oleg Troyansky
QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense
I wasnt exactly sure how to apply the expression so thank you for the detailed response, much appreciated.