Alteryx Designer Desktop Discussions

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

Filling in Years even without data

reubenlai
5 - Atom

Hi Community,

 

I'm trying to generate tables according to my data with Macro and App set up. Everything is fine, but the output is skipping "Final Close Years" that do not have any data (e.g. It's missing Year 2011). I know I need to use "Generate Rows" tool and i'm not sure how to. Please enlighten me!

 

Thanks!

6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @reubenlai 

 

Here is a workflow for the task.

Output:

atcodedog05_0-1603865332126.png

Workflow:

atcodedog05_1-1603865345915.png

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

 

 

reubenlai
5 - Atom

Hi @atcodedog05, thanks for replying!

 

This seems would work, but i'm not sure how to incorporate it into my macro here. Should I union join that with my Summarize tool in the middle?

reubenlai_0-1603865644942.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @reubenlai 

 

Remove input tool and browse tool.

 

And just integrate/copy-paste&link at the before which you year generated.

 

So if you need years before select tool. You can integrate between summarize and select tool accordingly.

reubenlai
5 - Atom

reubenlai_0-1603867729636.png

I'm assuming you're trying to scan the input and if there's a null year, then add in that year as in last available year +1 right?

atcodedog05
22 - Nova
22 - Nova

Hi @reubenlai 

 

Yes so basically Row+1:Year gives me year in next row. And at the last year there is no next year so current [Year]+1 so support row generate tool.

 

The above issue might be occurring because your column name is Final Close Years and my column name is year 

 

I have renamed to match yours it should work now.

 

Hope this helps 🙂

 

reubenlai
5 - Atom

Thanks @atcodedog05! That works!!!

Labels