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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
mikegrattan
Specialist
Specialist

Filter table on duplicate values

I've got the following formula that shows me if a check number is duplicated, but now I want to filter the table to show only those checks that are duplicates.  Please advise.  Thank you.

=If(count(TOTAL <CheckNo> CheckNo)>1,1,0)

mikegrattan_0-1630090305946.png

 

1 Solution

Accepted Solutions
stevejoyce
Specialist II
Specialist II

For on-the-fly calculation of duplicate (i.e. taking our selections in to account) use below.

convert to a calculated dimension using aggr, you can move this to set analysis as well:

When you select 1, it will select the combination of fields in your aggr(), so in the below it will select the CheckNos that have duplicates.

=alt(aggr(count(distinct{<CheckNo= {"=count(CheckNo) > 1"}>} 1), CheckNo),0)

 

If you can/want to have it based on entire data set, you can create your duplicate flag in the data model as a field, with count / groupby.

View solution in original post

3 Replies
stevejoyce
Specialist II
Specialist II

For on-the-fly calculation of duplicate (i.e. taking our selections in to account) use below.

convert to a calculated dimension using aggr, you can move this to set analysis as well:

When you select 1, it will select the combination of fields in your aggr(), so in the below it will select the CheckNos that have duplicates.

=alt(aggr(count(distinct{<CheckNo= {"=count(CheckNo) > 1"}>} 1), CheckNo),0)

 

If you can/want to have it based on entire data set, you can create your duplicate flag in the data model as a field, with count / groupby.

mikegrattan
Specialist
Specialist
Author

This works perfectly, thank you!

stevejoyce
Specialist II
Specialist II

@mikegrattan  great!  please mark solution so post can be closed and marked appropriately.