Alteryx Designer Desktop Discussions

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

Add fields to an input that hasn't happened yet

cam_delavedua
5 - Atom

Hi! I'm working on a workflow that depends on months of the FY. We start on July '23 and finish on June '24. The input brings hours worked per week, that was grouped by month. But as the input brings until the last available date, I need a second input that would add the fields from the months that haven't happened yet, and mark them as 0 (as no hours were worked). But next month when they add the hours from it, the hardcoded input won't overwrite. I need that it shows 0 but as soon as the new input has values, to start showing those values in their respective fields. 

 

This table shows how it should look

Captura de pantalla 2024-02-27 172643.png

 

And this is my WF now

Captura de pantalla 2024-02-27 1728q31.png

6 REPLIES 6
Raj
14 - Magnetar

@cam_delaveduaas these fileds are double
i suggest a easy way ,instead of doing a hard Code
just add a data cleansing tool at last where you will replace all the nulls with 0

this should work perfectly in your case.

Raj
14 - Magnetar

@cam_delavedua there are other ways as well
for example using mutli field formula

cam_delavedua
5 - Atom

Hi Raj! But if I hard code it with an input tool, then when a new month comes would it be overwritten? That's what I'm looking for. And if not, how would you use the multifield formula here? 

Raj
14 - Magnetar

@cam_delavedua 
you have the data updated every month 
what i suggested is first by the transformation you Create the data for all the available months 
then using a text input tool create all the 12 months as headers
once you union them you will find the extra columns with no entry as null then you can do the final step either way suggested above

if you have still any queries add some sample data will help with the flow.


DawnDuong
13 - Pulsar
13 - Pulsar

Hi @cam_delavedua 

Seconding @Raj . I often face similar data structure which has monthly columns and the columns keep changing. 
if you hard code the month you will have a non-dynamic and error prone solution.

transforming the data to the “narrow” format with the month transposed makes the data more tractable and allows for more dynamic manipulation downstream.

cheers

dawb

Raj
14 - Magnetar

@DawnDuong i agree with you
that was the main reason i suggested not to hard code the months values 
using template to bring the column headers which will remain same around any year.

Regards,

Raj

Labels