Hi all,
I'm trying to build a workflow calculating Running Total per month, quarter or year.
(Refer to Running Total Workflow screenshot)
During the build of workflow, I encounter the below problems (I marked the corresponding alphanumeric characters onto my workflow for your ease of reference):
1/ The Running Total shuffles the order of outputs, even though I sorted the data set by order date before calculating the Running Total per month, quarter, and year.
2/ Is there a shorter solution to calculate the Running Total per month, quarter, and year while keeping only the lump sum rows?
3/ In relation to request 2 above, I'm trying to calculate the Running Total per month, quarter, and year (keeping only the lump sum rows) by:
- Using the Summarize Tool to extract the last date in each month.
- Using the Join Tool to combine the original data set with the last date in each month.
However, I encountered three issues while doing this:
a) Similar to the issue that occurs in the Running Total Tool, the output in the Join anchor of the Join Tool is shuffled, even though I sorted the data set by order date before joining.
b) Before joining, several results of the Running Total are incorrect
E.g.:
- Mar 2016 (it should be 213.74 instead of 329.93)
- Aug 2026 (it should be 4215.79 instead of 4623.35).
(Refer to Running Total Result Comparison screenshot)
c) The final result does not contain the Running Total for several months, e.g., Mar 2016, Aug 2016, Nov 2016.
(Refer to Running Total Result Comparison screenshot)
4/ Other question not in relation to my workflow
I'm new to Alteryx Community, so may I know how to attach a screenshot directly onto my post (rather than attach its screenshot like I'm doing)?
I hope to receive your discussions/ solutions to resolve the above.
Solved! Go to Solution.
I can't run the workflow as I don't have the input data handy and resisting the urge to go find it.
The sorting issue is happening due to parallelisation. You can stop this by turning off the AMP Engine in Runtime Settings on the workflow, however it shouldn't matter in this process.
I would be aggregating these to the relevant granularity (so 3 streams) using summarize tools and then doing the running total, then join it back together in whichever fashion you like. I think this is the key. I can see that on ToolId 23, you group by Quarter/Year. I'm pretty sure that will only calculate the totals within those groupings, not the running total of those groupings.
There are several issues at play.
First, it appears that Running Total is not your goal. You seem to only want the Totals for by month (and possibly by quarter and year), respectively. Is this correct?
I will share how to handle that, but first, for your learning, 2 of your questions relate to an issue in your workflow:
You can get the values you're looking for far more simply by using a few Summarize Tools:
Finally, Welcome to Alteryx, where there are many ways to solve a problem, but don't try to over-complicate things (which can be hard when you are first starting out). When posting there should be a button like this:
that you can use to add in-line images instead of attaching them.
Hope this helps and Happy Solving!
AMP stands for Alteryx Multi-threaded Processing. So when those tools execute, they'll split the data into several chunks so that it can be processed separately. Hence, why it comes out the other side in a different order. By turning AMP off, you are reverting to the single threaded engine that doesn't chunk like that.
Thank CoG,
It does help me a lot. I genuinely appreciate the time and effort you put into your responses, especially your dedication to helping me learn through your questions.
Thank KGT,
I'll note on it for my further working on Alteryx.