We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to calculate difference between columns dynamically?

bui195
7 - Meteor

I'm trying to build a dynamic workflow that can calculate the difference between 2 months. I don't want to use Formula because the column names will change month by month. I'm using transpose and multi row formula but haven't been able to convert it back to the way I want. Below is the current input:

bui195_0-1675265733859.png

 

And this is my desired output. My current issue with the multi row formula is it keeps calculating the variance for previous month by repeating the October value in MoM Variance column. 

bui195_1-1675265930407.png

TIA

8 REPLIES 8
binuacs
21 - Polaris

@bui195 One way of doing this

 

binuacs_0-1675266717942.png

 

FinnCharlton
13 - Pulsar

Hi @bui195 , here is one way to do this:

FinnCharlton_0-1675266812331.png

 

Gautam_Iyer
7 - Meteor

Here is one way to achieve it.

bui195
7 - Meteor

Thank you for your reply! When I apply your method into my actual data, I have an issue at the Multi row formula that it calculate the difference in the 10-31-2022 row too. It actually repeats the October value (335789) in the MoM difference column instead of showing 0. Any ideas how to fix that issue?

 

bui195_0-1675270645278.png

 

binuacs
21 - Polaris

@bui195 Can you screen shot your multi-row tool configuration? 

bui195
7 - Meteor

This is the configuration:

bui195_0-1675271459246.png

This is the outcome I currently see (I cut out the GL and client ID) but you can see it repeats the value for October:

bui195_1-1675271538454.png

bui195_2-1675271561152.png

 

 

apathetichell
20 - Arcturus

deleting my comment - back to the peanut gallery and the capable workflow builds of the rest of the crew...

bui195
7 - Meteor


I actually figured it out. I missed the "Values when rows don't exist". I should have changed to Null. It works now. Thank you so much!!!

Labels
Top Solution Authors