Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Adding Column Values as per present month

areeba
8 - Asteroid

Hi @atcodedog05 ,

I have two  excel files

1)File1: 2021m07

2)File2: Final_report_07_2021

 

 

File1 is empty and File2 has a data.

 

 

Requirement:

 

File2 has columns with the month names.

I have to Sum these columns amount in a way that it adds up from Jan to present month.

For Example: These files are for month July , so it should add (Jan to Jul)/1000

For the next month it should add from (Jan to August)/1000

 

Desired_Output:

Result

381

 

My approach : i thought to take the month name from File name and map it with the column month name.

 

Can you help to solve this in better way or with my approach?

 

Regards

Areeba

10 REPLIES 10
atcodedog05
22 - Nova
22 - Nova

Hi @areeba 

 

It would be something like this. But your values don't seem to match please check on that.

 

Workflow:

atcodedog05_0-1633424221021.png

 

Hope this helps : )

 

areeba
8 - Asteroid

Hi @atcodedog05 

 

This worked for me , Thanks a lot 🙂

 

Regards

Areeba

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @areeba 

Cheers and have a nice day!

areeba
8 - Asteroid

Hi @atcodedog05 ,

 

I have a similar situation, only difference is my File name is '2021m07 IT Save Forecast' instead of 'Final_report_07_2021'. can you help me with the Regex to write in formula to extract month?

 

Regards

Areeba

atcodedog05
22 - Nova
22 - Nova

Hi @areeba 

 

Try Regex 

 

DateTimeParse([FileName],"%Ym%m IT Save Forecast")

 

Hope this helps : ) 

areeba
8 - Asteroid

Hi @atcodedog05 .

 

Thank you for the reply , after applying your regex i am getting this:

areeba_0-1637674853867.png

 

i think it should print 1400-07-01 instead of 2021-07-01, like you did in previous workflow.

 

Regards

Areeba

atcodedog05
22 - Nova
22 - Nova

Hi @areeba 

 

Try this formula

 

DateTimeParse(Right([FileName],20),"m%m IT Save Forecast")

 

Snapshot:

atcodedog05_0-1637735126576.png

 

Hope this helps : )

 

areeba
8 - Asteroid

Hi @atcodedog05 

 

Yes it worked, thank you 🙂

 

Regards

Areeba

areeba
8 - Asteroid

Thanks

Labels