Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Trouble with Three Transaction Moving Average

nbso222
5 - Atom

Hi,

 

I have been having trouble with a three transaction moving average. I reviewed the examples in Alteryx and my professor has looked over my multi-row tool and my configuration is exactly the same as my professor but it is not working correctly. I have tried typing and imputing the expression in multiple ways but still not working. My professor and I are both confused. 

 

 

 

4 REPLIES 4
nbso222
5 - Atom

Is there another way to create a moving average using the multi-row tool? My professor wants me to practice using this tool.

rkapoor
Alteryx
Alteryx
danilang
19 - Altair
19 - Altair

Hi @nbso222 

 

There are a couple of possible reasons for the discrepancy.   

 

The first is that the column that you're creating in your Mulit-row tool is an Int32.  That means that the any fractional values will be missing.  Taking an average of 3 values will always produce fractions unless the sum is a multiple of 3.  If the "3 Trans Avg" field in your professor's workflow is a Double or Float, you'll see differences

 

 

A second potential reason is the order that the records come into the Multi-row tool.  If the data is already grouped by the Grouped By fields then the records are treated in input order.    If there is something before the multi-row that changes to order of the records, you'll end up with different averages. In the attached workflow, the top branch is sorted by City ascending and Date ascending.  The bottom branch sort the records by City ascending and Date descending.  Both sets of records pass through their respective Multi-row tools without having their orders changed, but the averages are different.   

 

If it's not one these reasons, can you attach both your solution and your Professor's and we can have a look at them.  Be sure to attach the Input file as well

 

Dan

Labels
Top Solution Authors