Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

writing to excel based on a value

becki
8 - Asteroid

i have this, as a multi row formula, which sets a new field "newfield" :   if abs(DateTimeDiff([Row+1:EDWTD02_DOC_ISSUE_Y],[EDWTD02_DOC_ISSUE_Y],"days"))>400 then "Y" else "N" endif
//take the difference of the dates for each unique key_fld if there is more than one, in the table. if the ABS(difference) is more than 400, write out the key_fld. in theory, time moves forward and you don't need the ABS.

 

now I just want to write out, to excel, where newfield="Y", the key field.  i tried doing a formula, creating the field "PO_w_400_days_btn" as a string with this:

 

if [NewField]="Y"
then [key_fld]
else "NULL"
endif

 

 

but is that necessary or can you write an excel field based on testing if "newfield"="Y" without the formula command?

 

thanks

 

becki kain

 

3 REPLIES 3
Bob_Blackey
11 - Bolide

Hi Becki,

 

If you think about it you have to have some sort of test so yes you need the formula to populate that new field.

 

Or you could save a step and just have the formula for "newfield" return either [key_fld] or NULL

 

Good job on using the MultiRow formula tool - it's my favorite!

 

Cheers,
Bob

 

becki
8 - Asteroid

how do you define "null"?  thanks

 

gc
9 - Comet

It's the function "Null()"

Labels