Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys
I have a requirement where I need to find out (Max(Date) -7) but without considering the weekends.
For example if Max(Date) = 27th Jun 2022 then in that case (Max(Date)-7) should be "17th Jun 2022" and not "21st Jun 2022".
I want to do this in front end.
I would really appreciate a response.
Hi.
Maybe this helps you.
Sample Date generation from Today -1 to past 100 days:
a:
LOAD
Date(Today()-1-RowNo()+1) AS Date
AUTOGENERATE 100;
Expression used to desconsider the non working days:
DATE(Max({<Date-={"=MATCH(WeekDay(Date)*1,0,6)"}>} Date,7))
Result:
@Manish Please use something like below expression
NetWorkDays(Today()-7,today())
Or In your Case I have created 2 Variables: Vstartdate=Max(Date)
V7DaysPrior=Max(Date)-7
Final Expression would be :NetWorkDays($(V7DaysPrior),$(Vstartdate))
Hi.
Maybe this helps you.
Sample Date generation from Today -1 to past 100 days:
a:
LOAD
Date(Today()-1-RowNo()+1) AS Date
AUTOGENERATE 100;
Expression used to desconsider the non working days:
DATE(Max({<Date-={"=MATCH(WeekDay(Date)*1,0,6)"}>} Date,7))
Result: