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.
Is there another way to create a moving average using the multi-row tool? My professor wants me to practice using this tool.
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
User | Count |
---|---|
106 | |
82 | |
70 | |
54 | |
40 |