Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
didierodayo
Partner - Creator III
Partner - Creator III

Count Set Analysis error

I need some help working out what is wrong with this expression: I am getting error in expression.

I am trying to Count the contact numbers that appear more than once on the contact field in the same table.

count({<count(distinct[MOBILE_PHONE_NB]){'>1'}>}[MOBILE_PHONE_NB])

1 Solution

Accepted Solutions
trdandamudi
Master II
Master II

I am not sure why you are not able to see the attachment... I do not have access to send emails..Any have here are the steps and hope this will be helpful......

Below is script:

Table:

Load  * Inline [

Claimant_ID,CLAIM_ID,MOBILE_PHONE_NB

1, 255, 99784561

2, 266, 77542168

3, 267, 68542879

4, 268, 11789562

5, 269, 99784573

6, 270, 33535565

7, 271, 74145428

8, 272, 94852630

9, 273, 25893754

10, 274, 99784562

11, 275, 99784561

];

Now Create a Pivot Chart as below:

Dimensions:

Claimant_ID

MOBILE_PHONE_NB

Expressions:

=count({$<MOBILE_PHONE_NB={"=Count(MOBILE_PHONE_NB)>1"}>}Claimant_ID)

View solution in original post

8 Replies
Anonymous
Not applicable

Hi Didier,

Could you please provide more details about how do you want to display the data?

Regards,

-- Karla

swuehl
MVP
MVP

The set expression syntax is not correct.

Have a look at

A Primer on Set Analysis

and try maybe something like

=Count({<[MOBILE_PHONE_NB] = {"=Count([MOBILE_PHONE_NB])>1"}>} DISTINCT [MOBILE_PHONE_NB])

trdandamudi
Master II
Master II

Attached is a sample app and hope this helps you...

didierodayo
Partner - Creator III
Partner - Creator III
Author

    hi all,

as you can see from this table I suspect there is some fraudulent activity.

- student 1 and student 11 are using the same phone number

- student 5 and 10 have similar number (the first 7 digits are the same)

I need the set analysis script to Identify similar(the first 7 digits are the same) or same numbers where the claimant_id is different. and return the phone number (s).

I hope this clarifies. Thanks a lot

Claimant_IDCLAIM_ID
MOBILE_PHONE_NB
1
25599784561
226677542168
326768542879
426811789562
526999784573
627033535565
727174145428
827294852630
927325893754
1027499784562
1127599784561 
didierodayo
Partner - Creator III
Partner - Creator III
Author

Hi Thirumala,

I can't see your attachement. I have added a new documents to clarify what I need. could you resend the attachment please.

Thanks

trdandamudi
Master II
Master II

I modified according to your logic and this will list out where the phone numbers are same:

didierodayo
Partner - Creator III
Partner - Creator III
Author

Hi Thirumala,

Where is your attachment? If you are having issues attaching maybe email it to me  esterdid@hotmail.com

Thannks

trdandamudi
Master II
Master II

I am not sure why you are not able to see the attachment... I do not have access to send emails..Any have here are the steps and hope this will be helpful......

Below is script:

Table:

Load  * Inline [

Claimant_ID,CLAIM_ID,MOBILE_PHONE_NB

1, 255, 99784561

2, 266, 77542168

3, 267, 68542879

4, 268, 11789562

5, 269, 99784573

6, 270, 33535565

7, 271, 74145428

8, 272, 94852630

9, 273, 25893754

10, 274, 99784562

11, 275, 99784561

];

Now Create a Pivot Chart as below:

Dimensions:

Claimant_ID

MOBILE_PHONE_NB

Expressions:

=count({$<MOBILE_PHONE_NB={"=Count(MOBILE_PHONE_NB)>1"}>}Claimant_ID)