Free Trial

Alteryx Designer Desktop Discussions

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

Adding data automatically for missing month

Karthick461
8 - Asteroid

Hello,

 I have 3 columns as input. Product,period, sum(sales) like below. 

Example:

Product Period   Sum(Sales)

M1         2021001              50

M1         2021002              60

M2         2021001              10

M2         2021002              12

M2         2021003              12

M3         2021002              50

M3         2021003              30

 

My Requirement is if Product not there for any month , it has to show as '0' instead of not showing

 

M1 ( 2021003 ) was not there. I need to add for the missing period and add 0 as sum(sales)

M3 ( 2021001 )  was not there

 

Output Requirement as:

Product Period   Sum(Sales)

M1         2021001              50

M1         2021002              60

M1         2021003              0

M2         2021001              10

M2         2021002              12

M2         2021003              12

M3         2021002              50

M3         2021003              30

M3         2021001              0

 

Any way to achieve this

1 REPLY 1
gabrielvilella
14 - Magnetar

Hi @Karthick461, assuming the date is on the format yyyy0mm, here is a solution.

gabrielvilella_0-1645553664125.png

 

Labels
Top Solution Authors