# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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.

 Agent Policy No Status A 1 IF A 2 IF A 3 LA B 4 LA B 5 IF C 6 MA C 7 LA

The expected result is:

 Agent No. of IF policies A 2 B 1 C 0

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
Valued Contributor

## Re: Set analysis with identifier 1-full selection

I think

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

New Contributor

## Re: Set analysis with identifier 1-full selection

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

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 No Movement Movement Date 1 IF 1/1/2018 1 LA 1/2/2018 1 IF 1/1/2018 2 IF 1/2/2018 3 IF 1/1/2018 3 LA 1/3/2018 4 IF 1/2/2018 4 LA 1/3/2018 5 IF 1/1/2018 5 LA 1/2/2018 5 IF 1/3/2018 6 IF 1/1/2018 6 LA 1/2/2018 6 IF 1/3/2018 6 MA 1/4/2018 7 IF 1/1/2018 7 LA 1/3/2018

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

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.

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])

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])