Alteryx Designer Desktop Discussions

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

How do you generate rows of data for missing week numbers?

RazorbackFan96
5 - Atom

Hello,

 

I have a query that pulls in 14 days worth of data. There are associated week numbers, for this situation 34,35,36. However, in some cases, there is only data for one or two weeks but not all three. I would like to capture the week numbers that have data but also generate one row for the weeks that have none.

 

For example, if week 35 has data I would like to pull in that as normal but generate two rows that show week 34 and 36 with nulls in every other column. I have tried the multi row tool but to no luck. Any help would be much appreciated.

 

RazorbackFan96_1-1662130985126.png

 

 

3 REPLIES 3
RazorbackFan96
5 - Atom

Pull in 3 week numbers regardless of data or not every time but make week numbers with no data null.

Qiu
21 - Polaris
21 - Polaris

@RazorbackFan96 
I am sorry but I was not able to fully understand.
Can you give a sample output?

AdwaitTarudkar
8 - Asteroid

Sample input data-

AdwaitTarudkar_1-1664503323941.png

 

Sample output data-

AdwaitTarudkar_2-1664503363795.png

 

Recipe- 

 

(select only the week number column and apply the multiple row tool to generate missing week number/s, then left join back to original data to identify a new entry in the week number row and then union back to original data to get rest fields as null)

AdwaitTarudkar_0-1664503276915.png

 

I hope this helps!

 

 

Labels