Forum Discussion
EugenioJunior
7 years agoFrequent Visitor
How subtract 1 working day from date column
Hi,
I have a date column [date of birth] and need to subtract a variable number of working days from that data.
How can I do this?
If the date field is not working day, then I need to advance this date to the most working day before the date given in the column.
2 Replies
- parry2k
Super User
EugenioJunior you can simply substract
new date = Table[Date of Birth] - <value you want to subtract>
and you can check if new date Date of week is Sat or Sunday, add # of days accordingly
- EugenioJuniorFrequent Visitor
Hi, parry2k
Thanks for the feedback. I need to remove holidays. How can I make this work?Data_Aniversario_UTIL =IF(WEEKDAY(LiberacaoAgenda[Data_aniversario],2) = 6,LiberacaoAgenda[Data_aniversario]-1, --SaturdayIF(WEEKDAY(LiberacaoAgenda[Data_aniversario],2) = 7,LiberacaoAgenda[Data_aniversario]-2 --Sunday))