Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

CountIfs based on dynamic similar values

laha10ae
5 - Atom

Hi, hope that anyone can help me with the issue that I have been battling with for some time now.

 

I'm trying to switch from Excel to Alteryx and I have a COUNTIFS function which does not look for an exact match, but a range of values and dates in order to find "possible" duplicates if data is similar.

 

Conditions:

Value: If the value is similar to another value up to (+- 2 %) 

Name: If the name is the same

Date: If the payment has been made on the same date or up to + - 1 day.

 

Example of possible duplicate:

In the below example Row 2 and Row 5 would be a possible duplicate, as the name is the same, values are similar (within +- 2 %) and the payment dates are not more than +- 1 day appart.

 

Alteryx - Countifs (3).JPG

 

Regards

Lasse

5 REPLIES 5
benakesh
12 - Quasar

Hi @laha10ae ,

Can you copy paste data instead of image ?  

example :

samplecol
a12
b13
c14
laha10ae
5 - Atom

Hi @benakesh ,
Thanks for your reply. Here you go!

 

ValueNamedate
100a10-10-2019
200b11-10-2019
300c12-10-2019
101a11-10-2019
400b14-10-2019
500c15-10-2019
600d16-10-2019
700e17-10-2019
800f18-10-2019
900g19-10-2019
1000h20-10-2019
1100i21-10-2019
1200j22-10-2019
1300k23-10-2019
1400l24-10-2019
benakesh
12 - Quasar

Hi @laha10ae ,

Let me know if this  works.

 

Conditions:

Value: If the value is similar to another value up to (+- 2 %)   

[Right_Value] >= ([Value] - [Value] * .02 ) and
[Right_Value] <= ([Value] + [Value] * .02 ) 

 

Name: If the name is the same     : join  tool  

 

Date: If the payment has been made on the same date or up to + - 1 day.   

DateTimeDiff([DateTime_Out],[Right_DateTime_Out],'days') < 2

 

 

 

 

OllieClarke
15 - Aurora
15 - Aurora

Hi Lasse, here's a workflow that does what you're after. Option 1 results in the same as your Excel worksheet. Option 2 includes a list of the possible duplicates.

 

clipboard_image_0.png

laha10ae
5 - Atom

Hi  and @benakesh

 

Both solutions do exactly what I need. Thanks a lot for your help!

 

Regards

Lasse

Labels