We posted the solution JSON file to Cloud Quest #20. Check it out and let us know what you think! Send suggestions to academy@alteryx.com or leave a comment below!
For more detailed instructions on how to import and export Designer Cloud workflow files, check out the pinned article Cloud Quest Submission Process Update.
For this week’s Cloud Quest, your task is to create a workflow that identifies the quarter in which your company achieves the highest profit margin with its clients. However, quarters are not defined in the traditional calendar sense. In this case, quarters are based on the length of a customer’s relationship with your company.
For example, if Customer A’s first contract started on 4/1/2018, the company defines Q1 for this client as starting on 4/1/2018, Q2 on 7/1/2018, Q5 on 4/1/2019, Q9 on 4/1/2020, and so on.
If Customer B’s first contract began on 7/1/2015, then Q1 for them would start on 7/1/2015, Q2 would start on 10/1/2015, etc.
Therefore, Q1 for Customer A begins 4/1/2018, and Q1 for Customer B begins 7/1/2015, even though these dates are years apart and occur at different times of the year.
Your objective is to determine which quarter has the highest profit margin for your clients. If you need assistance with the cost and revenue calculations, a hint is provided.
Hint: To calculate the profit percentage, you need to find the total revenue and total costs for each client during that quarter. For example, the quarterly profit percentage for Q5 includes all revenue and costs for every client during their fifth quarter with your company.
Important Formulas to Know:
Cost = Order Volume * Per Unit Production Cost
Revenue = Quarterly Premium + (Per Unit Fee for Customers * Order Volume)
Quarterly Profit Margin = (Total Quarterly Revenue – Total Quarterly Cost) / Total Quarterly Revenue
Note: We have noticed some unpredictable behavior in Designer Cloud when using the Round() function. Your Margin Percentage result may appear slightly different from the solution output.
A combination of the Summarize, Join, DateTime, Parse, and various Preparation tools should solve your problem, but not necessarily in this sequence.
If you find yourself struggling with any of the tasks, feel free to explore these interactive lessons in Alteryx Academy for guidance:
Once you have completed your quest, go back to your Analytics Cloud library.
I believe the Group Function in RecordID tool is newly added. I like it.
Done!