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.
SOLVED

Calculate Monthly Variance

sshahid96
5 - Atom

Hi, 

 

I have a data set that is grouped by a Unique ID and Month. I would like to the Total Balance and Average Balance fields to display the difference between the two months. Please see example below. 

 

Input: 

 

IDMonthTotal Balance Average Balance 
01May5,0002,000
01June7,0006,000

 

Desired Output: 

IDTotal Balance Average Balance 
013,0004,000
3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @sshahid96 

 

Here is how you can do it.

Workflow:

atcodedog05_1-1628792159144.png

 

1. Using multi-row formula to calculate abs([previous row] - [current row]). Abs is used to take positive value

2. Using summarize tool to take last row value with variance.

 

Hope this helps : )

 

sshahid96
5 - Atom

That worked. Thank you so much! 

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @sshahid96 

Cheers and have a nice day!

Labels
Top Solution Authors