Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

stevench
New Contributor

Set analysis with identifier 1-full selection

Hi

Based on my sample data below, I wish to calculate the 'IF' policies for each agent.

AgentPolicy NoStatus
A1IF
A2IF
A3LA
B4LA
B5IF
C6MA
C7LA

The expected result is:

AgentNo. of IF policies
A2
B1
C0

Used this expression: count({1<Status={'IF'}>} distinct([Policy No]))

which gives me expected result but when I apply filter for Agent B only, the charts still shows the full result for agent A,B,C.


How can do I both:

1. Calculate all IF policies disregarding the 'Status' filter (e.g. LA/MA) and count of IF policy remain as expected result and not '0';and

2. List is shortlisted based on the agent selected in 'Agent' filter?


Thank you in advance. Kind regards.

5 Replies

Re: Set analysis with identifier 1-full selection

Remove the 1: count({<Status={'IF'}>} distinct([Policy No]))


talk is cheap, supply exceeds demand
zebhashmi
Valued Contributor

Re: Set analysis with identifier 1-full selection

I think

Count ({<Status={'IF'}>} Total<Agent>[Policy No])

Capturetest.PNG


stevench
New Contributor

Re: Set analysis with identifier 1-full selection

gwassenaar zebhashmi for the replies which both works fine for the sample table.

Capture.PNG

However, when it is associated with another table with multiple records per policy and filtering; the count of IF policy changes.

Example data in table 2:

 

Policy NoMovementMovement Date
1IF1/1/2018
1LA1/2/2018
1IF1/1/2018
2IF1/2/2018
3IF1/1/2018
3LA1/3/2018
4IF1/2/2018
4LA1/3/2018
5IF1/1/2018
5LA1/2/2018
5IF1/3/2018
6IF1/1/2018
6LA1/2/2018
6IF1/3/2018
6MA1/4/2018
7IF1/1/2018
7LA1/3/2018

When I apply the filter on movement and movement date, then the results starts to change. For example, filter movement by LA:

Capture1.PNG

In this case, I believe the filter has resulted in it excluding the count on number of Policy without any LA status (e.g. Policy No 2).

Actually, the count of IF policies is intended for ratio calculation 'per agent', therefore should be fixed based on 'Status' per agent basis.

zebhashmi
Valued Contributor

Re: Set analysis with identifier 1-full selection

we are calculation only (IF)  if you want to know about

(LA) or all I would say remove status filter

may be that

Count (Total<Agent>[Policy No])

zebhashmi
Valued Contributor

Re: Set analysis with identifier 1-full selection

or maybe that but I don't think its going make a difference

Count ({1<Status={'IF'}>} Total<Agent>[Policy No])

Community Browser