Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Clarification regarding Weekend()

Hi all,

I am using Qlikview 11 and wanted  clarification regarding weekend() function. below is the expression and it's results. i am really confused about the results and need help.

date format is  m/d/yyyy.

weekend('1/3/2017',1,-1), result is 1/14/2017. Why is its so?. Here i am asking the weekend date of the previous week, which should be 1/2/2017 as i am using offset 1(Tuesday is the first day of the current week right? and 3rd January is Tuesday).

Also is there anyway to know the value of the variable firstweekday already loaded in qlikview?

Will be glad to get some help from you all.

Thanks in advance.

1 Solution

Accepted Solutions
sunny_talwar

I think you have misplaced -1 and 1, try this

WeekEnd('1/3/2017',-1,1)

View solution in original post

4 Replies
sunny_talwar

I think you have misplaced -1 and 1, try this

WeekEnd('1/3/2017',-1,1)

tresesco
MVP
MVP

The arguments are like:  WeekEnd(date [, period_no = 0 [, first_week_day=0]])

Then to get your desired result you should try exchanging your parameters, like :  =weekend('1/3/2017',-1,1)

Anonymous
Not applicable
Author

Thanks a lot Sunny. it worked

Anonymous
Not applicable
Author

Thanks Tresesco. problem got resolved as you and sunny suggested. Carelessness on my part.