Discussion board where members can get started with Qlik Sense.
I am using the lastworkdate function, which should return the date once adding x working days to the starting date, for example:
How would you set which weekdays should be referred as working days?
I understood that the default is Monday-Friday, but how can I change it to Sunday-Thursday?
I tried modifying FirstWeekDay attribute with no success
Go to Solution.
Actually, deducting one day from LASTWORKDATE output and adding one day to starting date will give the desired output.
lastworkdate (START_DATE+1, DAYS_AMOUNT)-1
there are no other options in lastworkdate than holidays.
Create your own workingday calendar (e.g, beginning at 1/1/2000 each day get the option working day yes/no, kumulate all days until 12/21/2020 (for example could be working day 2,219)
Than apply to each date the working day and apply again the lowest date to this day so you will get the last working day.
SET FirstWeekDay=5 // this will set Saturday as the first day of the week in your script declarations
Then you can use WEEKEND formula to always get the Friday date.
WEEKEND('2007-02-19') should return the friday you are looking for
Did this work you? Please update the thread if it did.
What I requested was to add X amount of working days to a certain date (as in LASTWORKDATE formula), based on Sunday-Thursday work-week, .
I assume this is not possible with LASTWORKDATE, based on the comment of martinpohl.
This can be a solution, but isn't there any built-in formula that allows working-week modification?