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.

To have some important columns from data

Polite123
8 - Asteroid

Hi Team,

 

I need some help with the below issues

 

I have attached data for reference

I need four columns in output everytime ie Moon,Jupiter,Saturn,Sun.

 

Even if any one of the varieties is not present in input,it must reflect in the output with 0 value as shown in the sheet

 

Thanks in advance.

2 REPLIES 2
mot
11 - Bolide

Hi @Polite123 ,

 

Please see attached.

mot_0-1615057622626.png

I hope this helps. Best.

 

 

 

SeanAdams
17 - Castor
17 - Castor

hey @Polite123 

 

As @mot 's canvas shows - there are 2 things going on here:

a) set up an empty data set with the right headings and union this with your incoming data to ensure that you always have these columns.   This is a very common pattern

- Caution: You may want to put a select after the empty data set to force the data types to be integers

b) You then want to look for empty values and replace them with 0

- you can use a formula tool for this or data-cleanse

- you can also use a multi-row as @mot  has done - multi-row is super-important when the value in one row depends on a value in another (you cannot do this in a formula tool)

 
Labels