Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Unique Number of Return Visitors

Hi - I need to get distinct member count who visits "login" page twice or more and I use the below expression

=Count(distinct IF(PG_NM = '"Login"' and count(PERSON_ADDM2_KEY) >1, PERSON_ADDM2_KEY))

but nested count count(PERSON_ADDM2_KEY) >1 is not allowed I guess and  not getting the result. Can anyone pls help with alternate for this? I am a month old to qlikview.

5 Replies
MVP
MVP

Re: Unique Number of Return Visitors

You can try set analysis to achieve what you want:

=Count(

{<PG_NM = {'Login'}, PERSON_ADDM2_KEY = {"=count(PERSON_ADDM2_KEY)>1"} >}

distinct  PERSON_ADDM2_KEY)

Not applicable

Re: Unique Number of Return Visitors

This helps swuehl.. but this does not get me the value,, are we missing something ?

p_verkooijen
Valued Contributor

Re: Unique Number of Return Visitors

Try

IF(COUNT({<PG_NM={'Login'}>}PERSON_ADDM2_KEY)>1, COUNT(DISTINCT PERSON_ADDM2_KEY), 0)

If the member has more than 1 login, count the distinct member

preminqlik
Valued Contributor II

Re: Unique Number of Return Visitors

use distinct in set


Count(

{<PG_NM = {'Login'}, PERSON_ADDM2_KEY = {"=count( distinct PERSON_ADDM2_KEY)>1"} >}

distinct  PERSON_ADDM2_KEY)



hope it hepls you...!


-regards

Pemhas

MVP
MVP

Re: Unique Number of Return Visitors

This helps swuehl.. but this does not get me the value,, are we missing something ?

Hard to say, without knowing your input and output in detail. Maybe you need to add the Login filter also to the count in the set modifier:

=Count(

{<PG_NM = {'Login'}, PERSON_ADDM2_KEY = {"=count({<PG_NM = {Login}>} PERSON_ADDM2_KEY)>1"} >}

distinct  PERSON_ADDM2_KEY)

and maybe this is sufficient then:

=Count(

{< PERSON_ADDM2_KEY = {"=count({<PG_NM = {Login}>} PERSON_ADDM2_KEY)>1"} >}

distinct  PERSON_ADDM2_KEY)

If this does not return the correct number, please post more details (best using a small sample (xls as input or qvw application) that demonstrates your issue, and add your requested output (for example in an Excel file)).

Community Browser