Alteryx Designer Desktop Discussions

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

Rolling calculation for distinct

arvindjha2051
6 - Meteoroid

Hello Team ,

 

I have attached a file below and my requirement is for a rolling calculation based on distinct of previous 3 months.

 

For example :

 

if you look at the Excel file you will find two columns :Date and SalesPerson

I need to find the distinct Salesperson over a 3 month rolling period :

 

Lets take example of expected output for June 2021 :

 

June has 3 distinct Salesperson 1 , 2 ,3

May has 4 distinct Salesperson 2 , 3 , 5 ,6

April has 4 distinct Salesperson 1,3 , 6 ,9

 

So the distinct Salesperson among the3 periods are 1 , 2 , 3 , 5 , 6 , 9 which is 6.

 

This 6 should be output for month June 2021

Same calculations would give :

April 2021 : 7

March 2021 : 5

May 2021 :7

 

6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @arvindjha2051 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1634727939923.png

 

Hope this helps : )

 

arvindjha2051
6 - Meteoroid

Thanks for the help , but i do not want it like this.

 

For any month i need to know distinct salesperson over a 3 month period.

 

So the output will not be this

 

For June 2021 i need to know distinct salesperson for the period April-June 2021 and so on.

atcodedog05
22 - Nova
22 - Nova

Hi @arvindjha2051 

 

Here is the updated workflow for the task.

 

Workflow:

atcodedog05_0-1634728684186.png

 

Hope this helps : )

 

arvindjha2051
6 - Meteoroid

Thanks a lot , output looks correct , could you share the worflow file.

 

Thanks

Christina_H
14 - Magnetar

Here's my version:

Christina_Hurrell_0-1634728867747.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @arvindjha2051 

 

Check the attachment below the post. Search for Sales.yxmd

Labels