Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
peisenrot
Contributor III
Contributor III

Formular for set last friday

hello,

I would like to create a variable which give me the last friday as a date. But I have no idea how to calculate that.

Best regards

Pia

Labels (1)
1 Solution

Accepted Solutions
Or
MVP
MVP

You should be able to do this using https://help.qlik.com/en-US/qlikview/May2023/Subsystems/Client/Content/QV_QlikView/Scripting/DateAnd... by specifying the first_week_day optional parameter. Alternatively, you can check the weekday of the date in question and then subtract the appropriate number of days (e.g. two days if it's Sunday) to get the prior Friday.

View solution in original post

2 Replies
Or
MVP
MVP

You should be able to do this using https://help.qlik.com/en-US/qlikview/May2023/Subsystems/Client/Content/QV_QlikView/Scripting/DateAnd... by specifying the first_week_day optional parameter. Alternatively, you can check the weekday of the date in question and then subtract the appropriate number of days (e.g. two days if it's Sunday) to get the prior Friday.

BrunPierre
Partner - Master II
Partner - Master II

Next Friday = Date(WeekStart(Today(1), 1, 4), 'DD/MM/YYYY')

Last Friday =  Date(WeekStart(Today(1), 0, 4), 'DD/MM/YYYY')