The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamic add to Date time add function

blakea
Átomo

Hello, 

 

Very new to the tool. I'm trying to start by building off of a spreadsheet I already have. The primary roadblock I have run into is working with dates. I am trying to calculate a runout date which I can do pretty simply in excel, but between formatting and an apparent inability to add outputs together with the DateTimeAdd function, I have hit a brick wall.

 

So I am trying to add number of days of stock I have available to the current date to give me a projection of when I will run out of stock. Seems like a pretty straight forward calculation, but every solution I have found seems to only use a static calculation. Any suggestions? Below is the suggestion of what I have started to work with, but I need -7 to refer back to a calculated field where each row would be different and "days" needs to output as a date.

 

DATETIMEADD(DateTimeToday(), -7, "days")

 

3 RESPUESTAS 3
Christina_H
Magnetar

You can just replace the -7 with the field you want to use instead, e.g. DATETIMEADD(DateTimeToday(), [Days], "days") where Days is a numeric field.

Christina_Hurrell_0-1632145912581.png

 

blakea
Átomo

So strange, I tried that before and it didn't work, but seems to work now. Thanks!

khuebsch5
Meteoroide

Hi -- what kind of data type needs to be selected for the numeric field? I've got a static field created to use, but whenever I replace -1 with the value in the field, it just nulls out.

Etiquetas
Autores con mayor cantidad de soluciones