Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
jiwaniakbiar
Contributor II
Contributor II

KPI to say How many individuals are below target percentage (say 50%)

I have 2 tables.

One table provides city-wise Targets as below:

CountryStateCityTarget
IndiaTelanganaHyderabad5
IndiaTelanganaSecunderabad2
IndiaMaharashtraBombay2
CanadaOntarioToronto400
CanadaOntarioMissisauga200

 

S.NoCityStatusDate
1HyderabadComplete20-Feb-19
2HyderabadComplete21-Feb-19
3HyderabadPartial21-Feb-19
4BombayComplete22-Feb-19
5BombayComplete22-Feb-19

 

I want to show a KPI which says # of centers whose completion percentage is < 50%

so here it should say 4 because only bombay is complete 100%.

 

 

Labels (1)
5 Replies
Channa
Specialist III
Specialist III

if Status completed you want to show as 4

because for bomaby target is 2..

 

=sum({<City={'Bombay'},State={'Maharashtra'},Status={'Complete'}>} Target)

=count({<City={'Bombay'},State={'Maharashtra'},Status={'Complete'}>} Status)

Channa
jiwaniakbiar
Contributor II
Contributor II
Author

Thanks but this will not help as I cannot hardcode city. Plus I am looking for count of citys where target is < 50% achieved

So basically I am looking at combining two steps

1. Calculate percentage completion for each city. This will be Count(Status=Complete)/Target for each city

2. Count of all the entries below 50% in step 1 above

Channa
Specialist III
Specialist III

see the attach

it has expression and QVF

Channa
jiwaniakbiar
Contributor II
Contributor II
Author

Hi Channa,

Thanks for sharing the file. This is displaying a table. I am looking for a KPI.  I have attached my attempt to articulate.

 

Channa
Specialist III
Specialist III

=count({<Status={'Complete'},City={'Bombay'}>} Status)/sum({<Status={'Complete'},City={'Bombay'}>} Target)

 

it is for bombay

Channa