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 adva...
parry2k
Super User
7 years agoEugenioJunior 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
EugenioJunior
7 years agoFrequent 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, --Saturday
IF(WEEKDAY(LiberacaoAgenda[Data_aniversario],2) = 7,LiberacaoAgenda[Data_aniversario]-2 --Sunday
))