Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Insert Missing dates and rows if there is no Inventory

AnanditaShankar
8 - Asteroid

Hi. I am trying to insert missing dates between 31st Decemeber 2021 till 31st July 2023 when there is no inventory noted on that day. For eg: If Plant Y352 has inventory only on 1st jan and 3rd jan then it should insert a row with missing dates and copy the same information for Y352 for 31st Dec 2021 and 2nd Jan with Inventory as 0 . Attaching an excel with expected input and output

9 REPLIES 9
FinnCharlton
13 - Pulsar

Hi @AnanditaShankar , here is one way to add all the missing dates. Hope it helps!

Screenshot 2023-08-03 101804.png

messi007
15 - Aurora
15 - Aurora

@AnanditaShankar,

 

Another way to do it.

Attached the zipped workflow and batch macro.

 

 
PhilipMannering
16 - Nebula
16 - Nebula

This is how I'd do it,

Screenshot 2023-08-03 110557.png

AnanditaShankar
8 - Asteroid

The dates should not be generated just based on Min and max dates but for all the dates between 31st Dec-2021 to 31st July 2023

PhilipMannering
16 - Nebula
16 - Nebula

Ah, I think @FinnCharlton 's solution does that.

AnanditaShankar
8 - Asteroid

No it doesn't. i tried it

AnanditaShankar
8 - Asteroid

I checked the count of dates generated across each plant and it's not the same for all

 

 

 

 

 

 

FinnCharlton
13 - Pulsar

@AnanditaShankar if you want it specifically between those dates, you can do it like this:

Screenshot 2023-08-03 134429.png

AnanditaShankar
8 - Asteroid

Thanks @FinnCharlton . This is what I wanted.

Labels
Top Solution Authors