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: 
Anonymous
Not applicable

How to unique count?

I have these sets of data where the  masterdate is mapped to a master calendar.

CLAIM_TRANNOClaim_CodeClaim_TypeCLAIMNUMBERMasterDateOwn_Damaged_CountProperty_Damage_Count
1PVCAFOD_FEEEIBV9074913PLM01/12/201200
1PVCRCODEIBV9074913PLM01/12/201210
2PVCAFOD_FEEEIBV9074913PLM01/01/201300
2PVCRCODEIBV9074913PLM01/01/201310
3PVCAFOD_FEEEIBV9074913PLM01/01/201300
3PVCRCODEIBV9074913PLM01/01/201310
4PVCRCODEIBV9074913PLM01/03/201310
5PVCRCODEIBV9074913PLM01/04/201310
5PVTRCTPPDEIBV9074913PLM01/04/201301
6PVCRCODEIBV9074913PLM01/04/201310
6PVTRCTPPDEIBV9074913PLM01/04/201301
7PVCRCODEIBV9074913PLM01/04/201310
8PVTRCTPPDEIBV9074913PLM01/06/201401
9PVCAFOD_FEEEIBV9074913PLM01/06/201400
9PVCRCODEIBV9074913PLM01/06/201410
9PVTRCTPPDEIBV9074913PLM01/06/201401
10PVCCTODEIBV9074913PLM01/06/201510
10PVTRCTPPDEIBV9074913PLM01/06/201501
11PVCCTODEIBV9074913PLM01/06/201510
11PVTRCTPPDEIBV9074913PLM01/06/201501
13PVCCTODEIBV9074913PLM01/06/201510
13PVTRCTPPDEIBV9074913PLM01/06/201501

For this claim number, i want to unique count the claim type based on OD and TPPD only.

The results should be like this in pivot table

                   Year Month

                    201202 201301 201304 201406 201506

no of claim        1                        1

How do i use set analysis to calculate this?

22 Replies
Anonymous
Not applicable
Author

I got this results.

Year20122013201320142015
MonthDecJanAprJunJun
No of Claims11111
avinashelite

Thanks for the clarification sir

Anonymous
Not applicable
Author

Hi

try this

=Count(Distinct({<CLAIMTYPE={'OD','TPPPD'}>}CLAIMNUMBER)

Anonymous
Not applicable
Author

It returns 0.

=Count(Distinct({<CLAIMTYPE={'OD','TPPD'}>}CLAIMNUMBER)

  

MonthDecJanAprJunJun
No of Claims00000
Peter_Cammaert
Partner - Champion III
Partner - Champion III

How do you get 201202 = 1 in your Pivot when there is no data for that period?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

A minor one, tres. The first Claim_Type should be OD, not OP. Funny how all other responses except for the one from rgvavihs copied your example.

Anonymous
Not applicable
Author


Month

Count(DISTINCT{<CLAIM_TYPE={'OD','TPPD'}>}CLAIMNUMBER)
1
011
031
041
061
121
Peter_Cammaert
Partner - Champion III
Partner - Champion III

So you mean that you want to count individual CLAIMNUMBERS that have both Claim_Types OD and TPPD in the same period? Or on the same day? And count all occurrences in the same period for a particular CLAIMNUMBER as one?

And where is the data for Feb 2012? Can we add it ourselves?

Anonymous
Not applicable
Author

Hi Peter,

     There's a typo there. it should be

Year Month

                    201212 201301 201304 201406 201506

no of claim        1                        1

The data is on transaction basis. What i need to count is for this claim there are OD and TPPD claim reported. So OD claim was first transacted on 201212 and TPPD claim was first transacted on 201304. The remaining transaction are just movements of the ClaimNumber.

Anonymous
Not applicable
Author

And count all occurrences in the same period for a particular CLAIMNUMBER as one?

I think this is the one that i need. Means for this claimnumber. There are 1 od and 1 tppd. However it need to reflects to its first transacted month.