Hi folks,
This might be something that may not be possible in Alteryx as I've tried various approaches and had no luck but here i goes:
I have data like so in which the category or code will never change:
Name | Category | Code | Date Inputted |
Dean Test | Leave | OT | 08/02/2023 |
Dean Test | Leave | OT | 22/09/2022 |
Dean Test | Leave | OT | 24/02/2023 |
Mark Test | Leave | OT | 13/10/2022 |
Mark Test | Leave | OT | 21/09/2022 |
Mark Test | Leave | OT | 21/05/2023 |
And what im trying to achieve is a dynamic way to get get the first of the week for the date Inputted
Solved! Go to Solution.
@Deano478 what is the expected output?
Assuming you'd like the Monday to be the start of the week, this formula should work:
DateTimeAdd([Date],-ToNumber(DateTimeFormat([Date], '%u'))+1,"day")
This converts the current Date field to 1-7 (Mon-Sun), then uses that to get back to Monday
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |