Qlik Community

Ask a Question

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Penetration Analysis

Hello All,

You guys were able to help me with a similar question, but the approach doesn't seem to work in this instance.

I am working on a % share analysis for products.  I am trying to use my filter selection (Billing State/Province) to then only show the penetration of each product within that selected state.  Here is my current expression...

count(distinct {<Lost={'N'},TotalActiveEmployeesClient=-{'=Len(Trim(TotalActiveEmployeesClient))=0'}>}[ClientNumber])/

count(distinct {1<Lost={'N'},TotalActiveEmployeesClient=-{'=Len(Trim(TotalActiveEmployeesClient))=0'},[Billing State/Province] = p()>}[ClientNumber])

I might not need the p() clause?.?.  Would this utilize the 'getselectedfields' modifier?

Any help is appreciated.


3 Replies

What you have should work, unless there is more to the chart then we are seeing here. Alternatively, you can try this:

Count(distinct {<Lost={'N'},TotalActiveEmployeesClient=-{'=Len(Trim(TotalActiveEmployeesClient))=0'}>}[ClientNumber])/

Count(distinct {1<Lost={'N'},TotalActiveEmployeesClient=-{'=Len(Trim(TotalActiveEmployeesClient))=0'}, [Billing State/Province] = $::[Billing State/Province]>}[ClientNumber])

Not applicable

Thanks Sunny, the numerator and denominator are unfortunately returning the same values. 

Not applicable

I actually figured it out...

count(distinct {<Lost={'N'},TotalActiveEmployeesClient=-{'=Len(Trim(TotalActiveEmployeesClient))=0'}>}[ClientNumber])/count(total distinct {$<Lost={'N'},TotalActiveEmployeesClient=-{'=Len(Trim(TotalActiveEmployeesClient))=0'}>}[ClientNumber])

I think it was I had a '1' identifier instead of  a '$' in the denominator.

Thanks again for your help.