Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
bhagi
Contributor II
Contributor II

upcoming weekday

Hi all,

I have a Listbox with dates, for example:

11/10/2017

11/11/2017

11/12/2017

11/13/2017

11/14/2017

11/15/2017

...

 

If I select any date, I need to know which is the next Saturday for that date

how to can i get this?

thanks 

bhagi

Labels (4)
4 Replies
Vegar
MVP
MVP

You could solve this by set analysis.Assuming your date field is named [Date] and you have a field containing weekday names named [Weekday]. 

Only({<[Date] ={">$(=only([Date])) <= $(=only([Date])+6)"}, [Weekday] = {'Sat'}>}[Date])

tresesco
MVP
MVP

Or something like:

=Date(DateField+6-Num(Weekday(DateField)))

Assuming Monday is 1 (i.e. - FirstWeekDay=6)

Chanty4u
MVP
MVP

why cant you try this?

SET FirstWeekDay=6;

 

=WeekEnd(Max(DateField))

Brett_Bleess
Employee
Employee

@bhagi you have received three very good responses to your question on this one, we would greatly appreciate it if you would return to the thread and use the Accept as Solution button on the post(s) that helped you resolve things.  If you did something different, you may post that and mark it after it is posted.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.