Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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

Hi peter, do you have any thoughts on this?@Peter Cammaert

jonathandienst
Partner - Champion III
Partner - Champion III

There are many OD and TTPD for the claim number. Do you mean that you want to count the first instances of the OD and TTPD for the claim?

If that is the case, you might want to add a flag field during your load to tag the first instances. Then you can simply add the flag values.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

Yes. This is just from one claim number. What if i have more than one claim number with multiple transactions.

Yes i can do a tag at back end but just wonder if able to do this at the front end/designer stage using set analysis so i wouldn't have to load it again.