In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. 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.
SOLVED

Weekday Function in excel

Alvin_C_Apostol
5 - Atom

Hi Everyone, 

 

Is there a way for me to do the operation below in alteryx?

 

so i have the computation below:

 

Alvin_C_Apostol_2-1600940653415.png

 

so the excel syntax is: =IFERROR($D2-(WEEKDAY($D2,2)-1),"""")

 

I am new in alteryx and I don't have an idea how to calculate it using alteryx

 

Hope someone can help me. 

 

thanks in advance 🙂

 

 

2 REPLIES 2
jdunkerley79
ACE Emeritus
ACE Emeritus

An equivalent expression would be:

 

 

DateTimeAdd([Date],1-ToNumber(DateTimeFormat([Date],"%u")),"days")

 

 

- DateTimeFormat([Date],"%u") will give you the WeekDay(,2) equivalent as a string

- ToNumber parses it to a number

- DateTimeAdd allows you to add a period to the date

 

Sample attached

 

Alvin_C_Apostol
5 - Atom

This works great thanks for your help! 

Labels
Top Solution Authors