Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

stunelson
New Contributor II

Retaining a KPI value after filtering

Hi, fairly new to QlikSense so any help would be appreciated.  I have a KPI which is counting the number of active services for a specific Customer, in this case the result is 14.  I also have a chart which allows me to filter the Services, when I do this the KPI updates to reflect the number of Services  selected.  I need to ensure the original value (14) is retained.

The expression in the KPI is:

=Count( {$<[SERVICE_STATUS] = {'Active'}>}Distinct Service_Number)

I think I need to somehow incorporate the Customer using the "only" expression but not sure how?

5 Replies

Re: Retaining a KPI value after filtering

Try this

=Count({1<[SERVICE_STATUS] = {'Active'}>} DISTINCT Service_Number)
stunelson
New Contributor II

Re: Retaining a KPI value after filtering

Hi Sunny,

This is giving me the count of Services across the dataset as opposed to a specific Customer.

Re: Retaining a KPI value after filtering

I guess ignore selection in Service field in that case

=Count({$<[SERVICE_STATUS] = {'Active'}, Service>} DISTINCT Service_Number)
stunelson
New Contributor II

Re: Retaining a KPI value after filtering

This now takes me back to my filtered count.

I was trying something like this but the expression is not quote correct:

=only({<Customer={1}>}count(SERVICE_STATUS={'Active'}>}Distinct Service_Number))

Re: Retaining a KPI value after filtering

I don't think I follow... would you be able to share a sample where I can see the issue??