Alteryx Designer Desktop Discussions

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

Compare two months values dynamically

TDB
6 - Meteoroid

 

Hello Alteryx Community!

 

I’m trying to create a workflow that will compare the last month that has actuals to the previous months actuals, the result being the difference, but I need it to be dynamic.  Meaning, the last month in the data set will not be the current month as the data is 1-2 months in arrears, also each month a new months worth of data is added to the data set.  If the previous month had no actuals then I want it to ignore/show no difference.  I’m not sure if it is better to have the data tall or wide, so my sample data sheet attached has two tabs, one with the data pre-cross tab and on post-cross tab.

 

Any help would be appreciated!

7 REPLIES 7
ImadZidan
12 - Quasar

Hello @TDB ,

 

Something like this?

 

I hope you find it helpful.

 

TDB
6 - Meteoroid

I'm unable to open your workflow because it says I'm running on an older version then you.  I'm on 2020.1.5.  Could you possibly attach screenshots instead?

ImadZidan
12 - Quasar

Please check if you can run this one. I modified the version in the yxmd file.

 

ImadZidan
12 - Quasar

Hello @TDB ,

 

In case you could not open file.

 

Actuals1.PNGActuals2.PNGActuals3.PNGActuals4.PNG

TDB
6 - Meteoroid

This gets me part of the way to my end result, but I still need to figure out how to create the logic so that it recognizes when the last month is, because I only care about the result/difference in the most current month available in the data set.  I think I need to add sequencing, I'm just not sure how to configure it.  

 

So my end result would show that in the most current month in the data set, June, the difference was 'x'.  Then next month when I run this, I need the logic to recognize that now July is the most current month in the data set, and that is the difference I want.  

 

I was unable to open your workflow, but the screenshots helped!

ImadZidan
12 - Quasar

Hello @TDB ,

 

I think I got you.

 

To get the data for the latest month only. We add a summary tool of the main input to workout the latest month. We then join to the final output on the latest month. It is dynamic. when your data includes a new month's data it will pick it up.

 

I hope it makes sense.

 

See screen shots.

 

 

summarize.PNGJoin.PNG

TDB
6 - Meteoroid

That worked - thanks for the help!

Labels