Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Community is experiencing an influx of spam. As we work toward a solution, please use the 'Notify Moderator' option on the ellipsis menu to flag inappropriate posts.

Alteryx Designer Desktop Discussions

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

Last value - First value for each month

Karthick461
8 - Asteroid

Hi ,

 I have excel file which has 2 columns ( Date and value). Date column contains date from 01/01/2021 till today. each date has one corresponding value.

Now I need to find the exact growth value for each month. i.e.. for Jan 2021 I need to find month end value - monthstart value( 01/31/2021 value - 01/01/2021 value). likewise for each month.

-->certain month start value or month end value might be null. so I need to ignore that as well. For example , 04/01/2021 has null value means , I need to consider 04/02/2022. likewise for month end as well

 

Any way to achieve this please

4 REPLIES 4
phottovy
13 - Pulsar
13 - Pulsar

Hi @Karthick461 ,

 

If I am interpreting your question correctly, the attached example workflow should get you close. Feel free to adjust my example data table if it is not the same as your data set and I can adjust my workflow accordingly.

Karthick461
8 - Asteroid

Hi @phottovy ,

 

Thanks a lot for the logic. I have got one more column added in my input ( DB ID ). Each DB ID has date from 01/01/2021 to till today.(1st screenshot)(few DB ID's might not have few dates) . I have around 20 DB ID's.

 

I have modified the Workflow. In Summarize tool, I have grouped new column(DB ID) as well ( 2nd screenshot ) . In joins, i have unchecked Right DB ID. but result value is not properly coming. its not grouping via DB ID. hence change value is also not correct.

 

Am I missing something?

Karthick461_1-1653392239271.png

 

Karthick461_2-1653392430230.png

 

 

phottovy
13 - Pulsar
13 - Pulsar

Hi @Karthick461 ,

 

Are you trying to get an individual total for each DB ID or do you only care about the overall month total? I made a change to the workflow to include several fake DB IDs. For the top part of the workflow, the main change I made is including the DB ID as one of my join fields in the join tools:

phottovy_0-1653404762643.png

 

The lower part of the workflow is similar to my previous one except it now summarizes by individual dates to give a total by month across all DB IDs.

Karthick461
8 - Asteroid

1st condition Perfectly Worked @phottovy 

 

I missed to add DB ID in joins conditions. that caused that issue. Thanks for your help. You are awesome

Labels