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: 
gal_polak
Creator
Creator

How to make default selections to apply the alternate state filters

Hi, 

i have two alternate states: team , agent

they help me to compare between the team sales and the selected agent sales over time.

 

but i also have country dimension and product 

how can i make that the default selections of country and product will filter the results possible in the alternate state filters?

(so i want be able to select an agent that is not from the same country as the team)

 

attached is a mock.Untitled.png

Labels (1)
1 Solution

Accepted Solutions
jwjackso
Specialist III
Specialist III

I used the P()  function.

 

Using the data below:


Data:
Load * Inline [
Agent,Team,Country,Product,Amt
A1,T1,C1,P1,100
A2,T1,C1,P2,200
A3,T1,C2,P3,300
A4,T2,C3,P4,400
A5,T2,C3,P5,500
];

I created to alternate states, Team and Agent.

Chart Team expression:  =Sum({[Team]}Amt)

Chart Agent expression: =Sum({[Agent]<Country=P([$]::Country),Product=P([$]::Product)>} Amt)

Filter Pane Agent Expression: =Aggr(If(Count({[Agent]<Country=P([$]::Country),Product=P([$]::Product)>}Agent) > 0,Agent,Null()),Agent)

team0.PNGteam1.PNGteam2.PNG

 

View solution in original post

2 Replies
jwjackso
Specialist III
Specialist III

I used the P()  function.

 

Using the data below:


Data:
Load * Inline [
Agent,Team,Country,Product,Amt
A1,T1,C1,P1,100
A2,T1,C1,P2,200
A3,T1,C2,P3,300
A4,T2,C3,P4,400
A5,T2,C3,P5,500
];

I created to alternate states, Team and Agent.

Chart Team expression:  =Sum({[Team]}Amt)

Chart Agent expression: =Sum({[Agent]<Country=P([$]::Country),Product=P([$]::Product)>} Amt)

Filter Pane Agent Expression: =Aggr(If(Count({[Agent]<Country=P([$]::Country),Product=P([$]::Product)>}Agent) > 0,Agent,Null()),Agent)

team0.PNGteam1.PNGteam2.PNG

 

gal_polak
Creator
Creator
Author

I see what you did there, it is cool approach, i used it and it worked as expected. 

thx!