Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Fill in the missing data and make continuous sequences

LEXQ2005
8 - Asteroid

Scenario: Students are taking online courses, the data source includes student name, hours of study, and the month student took classes.

Many students do not take classes every month. But I want to present continuous time series in the chart.

Below is the source data:

StudentMonth No.Hour
A180
A378
B190
B289
B386
B492
B596
B690
B778
C260
C680
C787
C1086
C1281

 

I want Alteryx to output a data set like this:

StudentMonth No.Hour
A180
A2 
A378
B190
B289
B386
B492
B596
B690
B778
C1 
C260
C3 
C4 
C5 
C680
C787
C8 
C9 
C1086
C11 
C1281

 

2 REPLIES 2
Jean-Balteryx
16 - Nebula
16 - Nebula

Hi @LEXQ2005 ,

 

Here is a workflow doing what you need.

 

Basically it takes the maximum value for each student then generates rows from 1 to the max value and joins back hours to those values. The last union gather all rows.

bensilv
Alteryx
Alteryx

Hi @LEXQ2005 

 

Please see the attached workflow.

 

Here I use generate rows to get all combinations, then a formula tool to overwrite the month column and replace hour with nulls (if it is a new row). Finally a unique to get the unique list.

 

bensilv_0-1627475087745.png

 

Labels