Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to remove duplicates

Hi team,

            I hope you are doing great. I’m kind of new working on Qlikview, and I have an issue with one formula. I hope someone can help me out.

What I’m trying to do is an expression that can remove duplicates. I have as the dimension the Supervisor ID, and each Supervisors have their own sellers. Each seller need to have an interaction day before the sale is done. They can just make one sale each day. So on my tables I have something like this, since sometimes may database duplicates the sale days.

SupervisorID

Seller

Interaction day

Sale day

1

Kenia

12/31/2013

01/03/2014

1

Kenia

12/31/2013

01/03/2014

1

Andres

12/31/2013

01/03/2014

1

Andres

12/31/2013

01/03/2014

1

Iñigo

12/2/2013

12/03/2013

1

Iñigo

12/2/2013

12/03/2013

My intention is just to count one Sale day for each interaction day, corresponding to each seller.

Meaning to have something like this:

SupervisorID

Seller

Interaction  day

Sale day

1

Kenia

12/31/2013

01/03/2014

1

Serrano

12/31/2013

01/03/2014

1

Iñigo

12/2/2013

12/03/2013

the total number of Sale day is “3”

I try to use a formula like: =count(DISTINCT if(saleday=interactionday,1,0))

What happned was that using this way DISTINCT it deleated one of the 01/03/2014, so I just stayed with “2”, but Im looking to have a 3 since are diferent sellers.

NOTE: I can’t modified my script nor my database. I have to use an expression.

I hope some one can halp me with this.

20 Replies
Not applicable
Author

By the way, here is the original issue where the vendor figure in the bar chart does not match the figure in the pivot table (correct version) with the original Expression on the bar chart.

Original Vendor Count Mismatch.png