# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
New Contributor III

## How to use filter in an expression and then use Count

Hi everybody.

I am a new to Qlik sense and I am hoping you can help with resolving issues I am having.

I need your help with this:

I have this table in Excel:

I need to create a KPI with this idea:

Total Status (Finish)/Total Accept (Ok) for each year and after create another KPI with the variation of 2016 vs 2017

If( Year('2017'),Count({<[Status]={'Finish'}>}[Status])/Count({<[Accept]={'Ok'}>}[Accept]),)

I try some diferents ways to do it but i can´t.

1 Solution

Accepted Solutions
MVP

## Re: How to use filter in an expression and then use Count

For 2017

Count({<[Status] = {'Finish'}, Year = {'2017'}>} [Status])/Count({<[Accept] = {'Ok'}, Year = {'2017'}>} [Accept])

For 2016

Count({<[Status] = {'Finish'}, Year = {'2016'}>} [Status])/Count({<[Accept] = {'Ok'}, Year = {'2016'}>} [Accept])

4 Replies
MVP

## Re: How to use filter in an expression and then use Count

For 2017

Count({<[Status] = {'Finish'}, Year = {'2017'}>} [Status])/Count({<[Accept] = {'Ok'}, Year = {'2017'}>} [Accept])

For 2016

Count({<[Status] = {'Finish'}, Year = {'2016'}>} [Status])/Count({<[Accept] = {'Ok'}, Year = {'2016'}>} [Accept])

New Contributor III

## Re: How to use filter in an expression and then use Count

Hi Sunny,

It's works perfectly.

Honored Contributor III

## Re: How to use filter in an expression and then use Count

If not, please make clear what part of this topic you still need help with .

May you live in interesting times!
New Contributor III

## Re: How to use filter in an expression and then use Count

Hi

I'm sorry, I didn't see the option.