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.
GELÖST

Formula to Combine Weekend Dates with Monday

BrandonS4
Asteroid

Is it possible to add weekend dates together with a Monday date?  I am trying to combine sales for Saturday and Sunday to sales for Monday.  For example,

 

Saturday, July 4, 2020 + Sunday, July 5, 2020 + Monday, July 6, 2020 would equal Monday, July 6, 2020.

3 ANTWORTEN 3
JosephSerpis
17 - Castor
17 - Castor

Hi @BrandonS4 I mocked up a workflow let me know what you think. From your question I assumed the date format was "Saturday, July 4, 2020" please let me know if that is not the case?

BrandonS4
Asteroid

This still works great.  However, how can I write the formula so the output is two digit month-two digit day-4 digit year??

vaishnavic
Atom

If DateTimeFormat(DateTimeParse([Date],"%d-%m-%Y"),"%A") ="Sunday" then
DateTimeAdd(DateTimeParse([Date],"%d-%m-%Y"),1,"day") Elseif DateTimeFormat(DateTimeParse([Date],"%d-%m-%Y"),"%A") ="Saturday" Then DateTimeAdd(DateTimeParse([Date],"%d-%m-%Y"),2,"day") Else DateTimeParse([Date],"%d-%m-%Y") Endif

Beschriftungen
Top-Lösungs-Autoren