Alteryx Designer Desktop Discussions

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

Add / SUM from dates on spreadsheet from months Jan thru December

txjohnnypops79
8 - Asteroid

I want to Add / SUM from dates on a spreadsheet from months Jan thru December, but only the last 6 months. 

So I run a report every month for the last 6 months and I have to change it manually each month and enter the new month in and remove the last one.

How can I have it just add whatever month is in my date range?

 

Any help is appreciated my friends! 

 

Regards,

 

JohnnyF

4 REPLIES 4
Matthew
11 - Bolide

if i were you, i'd use the "DateTime Parse" tool to change the "Inventory Txns Date" field into a datetime field instead of text

 

once you have that, then you can just filter for the previous 6 months

 

[Inventory Txns Date] >= DateTimeAdd(DateTimeToday(),-6,'months')

txjohnnypops79
8 - Asteroid

💡

 

My man! I might give that a try.

 

 

Thanks, Matt.

Maskell_Rascal
13 - Pulsar

Hi @Matthew 

 

I hope you don't mind, but I rebuilt the back half of your workflow to this:

Maskell_Rascal_0-1662138542055.png

 

I'm using some Dynamic Select and Multi-Field Formula tools to help speed up and optimize your workflow. This will now always grab the last 6 columns in the dataset and create a Sum and Average column. I am also utilizing a Dynamic Rename tool to update the column names that prevents the Date columns from not being in chronological order. 

 

Output looks like this:

Maskell_Rascal_1-1662138726899.png

 

I've attached a packaged workflow for you to try out. 

 

Let me know if this helps.

 

Cheers!

Phil

txjohnnypops79
8 - Asteroid

Wow @Maskell_Rascal , Really appreciate it!

Hope one day I become an Alteryx master!

Labels