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

Substitute actual month values with previous month ones

MatteoMalchiodi
5 - Atom

Hello everyone,

 

I'm struggling with this situation:

MatteoMalchiodi_0-1602757131800.png

 

I would need a function that substitute only the current month (ex. in this case 2020-10) values in column E (in this case -496,569) with the previous month value(-2627,35). 

If the date is not this month, just give me the value in E column.

Thanks a lot in advance for your help!

Matteo

9 REPLIES 9
atcodedog05
22 - Nova
22 - Nova

Hi @MatteoMalchiodi 

 

Can you quickly provide this sample data. It can be solve with multi-row formula tool.

atcodedog05
22 - Nova
22 - Nova

Hi @MatteoMalchiodi 

 

Here is a workflow for the task.

 

Input:

atcodedog05_0-1602758463898.png

Output:

atcodedog05_1-1602758487488.png

Workflow:

atcodedog05_2-1602758509575.png

If you provide sample data i build a workflow for it too.

Hope this helps 🙂 

 

If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

MatteoMalchiodi
5 - Atom

Yes of course,

please find attached a sample data of this database

atcodedog05
22 - Nova
22 - Nova

Hi @MatteoMalchiodi 

 

Here is the workflow based on your data.

 

Input:

atcodedog05_0-1602758801411.png

Output:

atcodedog05_1-1602758825987.png

Hope this helps 🙂

 

If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

 

MatteoMalchiodi
5 - Atom

Hello,

 

thanks a lot for your help and time,

 

I don't think it will work for all the rows:

Let's suppose we are in September.

MatteoMalchiodi_0-1602759318345.png

in this case as you can see the current month which will be 2020-09 value (-1755) would be substitute with -699 (previous row). But in this case I'd like to have 0 as the previous month (august) is empty.

atcodedog05
22 - Nova
22 - Nova

Hi @MatteoMalchiodi 

 

Is there a column giving current month.

 

The current workflow takes todays date to calculate current month.

But if there is a current month field we can adapt accordingly 

atcodedog05
22 - Nova
22 - Nova

Hi @MatteoMalchiodi 

 

I got your point your claim is what if the previous month is missing.

I have modified the workflow according to it.

 

Output:

atcodedog05_0-1602760053061.png

In this demo output i have removed all 2020-09 so value for 2020-10 is 0

atcodedog05_1-1602760104010.png

You can check and let me know 🙂

 

MatteoMalchiodi
5 - Atom

Great! That's seems working fine now! 

Many many thanks for your help @atcodedog05 !! 🙂 

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @MatteoMalchiodi 

 

Cheers and Happy Analyzing 😀

Labels
Top Solution Authors