Alteryx Designer Desktop Discussions

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

How to split value based on month of date range

hal_dal
8 - Asteroid

Hello,

 

hopefully my topic isn't too confusing. 

But I basically have a total column and weekday (Mon-Sun) column with values and a time range column.

I need to split the total column based on the time range (whether the time range expands beyond the month)

 

As an example:

Below is my input data

 

IDTime-PeriodMonTuesWedThursFriSatSunTotal
ABC-1238/31/2020 - 9/6/2020534000012
ABC-1558/31/2020 - 9/6/2020453250019
DDE-1238/31/2020 - 9/6/20201232130021
FEE-1238/31/2020 - 9/6/2020780460025
ABC-1239/7/2020 - 9/13/202061243560072
ABC-1559/7/2020 - 9/13/2020453556300112
DDE-1239/7/2020 - 9/13/20205745760079
FEE-1239/7/2020 - 9/13/2020424580023
ABC-1239/14/2020 - 9/20/20206463390067
ABC-1559/14/2020 - 9/20/20203325400044
DDE-1239/14/2020 - 9/20/20205447500061
FEE-1239/14/2020 - 9/20/20205432876300173
ABC-1239/21/2020 - 9/27/2020576998200190
ABC-1559/21/2020 - 9/27/20206500560067
DDE-1239/21/2020 - 9/27/2020754604300128
FEE-1239/21/2020 - 9/27/20203235352200115
ABC-1239/28/2020 - 10/4/202044234640090
ABC-1559/28/2020 - 10/4/20206743850087
DDE-1239/28/2020 - 10/4/2020896809000166
FEE-1239/28/2020 - 10/4/20203200860046

 

 

 

Below is the expected output data:

 

IDMonthTotal
ABC-123August5
ABC-123September416
ABC-123October10
ABC-155August4
ABC-155September312
ABC-155October13
DDE-123August1
DDE-123September445
DDE-123October9
FEE-123August7
FEE-123September361
FEE-123October14

 

You'll see that I have split up the month data based on Time-Period column

and the values/total are also extracted based on the time-period as well.

 

Its a bit hard to explain but hopefully my sample data makes more sense.

1 REPLY 1
grazitti_sapna
17 - Castor

Hi @hal_dal , try this. I hope this works for you.

 

grazitti_sapna_0-1600231996215.png

Thanks.

 

 

Sapna Gupta
Labels