
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Week start and end date display
Hi all,
I need to display the week start date and end date when I filter for week, i.e max week should display and along with start date and end date of that week. similarly when i filter for other weeks also particular start date and end date of that week.
start date and end date i need to display in text box, below is the week start date for my week51.
2018-06-15,
16,
17,
18,
19,
20,
2018-16-21
Thanks,
Gowtham
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, Try this in text box:
Dual(Weekstart(Date)&'-'&Weekend(Date),week(Date))


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Look into the functions for this named:
WeekStart() - https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/DateAndTimeFun...
WeekEnd() - https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/DateAndTimeFun...
That should help you out
You can use Date() formatting on that and change to 'YYYY-MM-DD' or however you want it.
Date(WeekStart(Max(Date)),'YYYY-MM-DD')
gives per say:
In a data model where the highest date I chose was 26.06.2017 and I changed the formatting.
Best,
Ali A

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can create addition field in your script:
date(WeekStart([Date]),'YYYY-MM-DD')&' - '&Date(WeekEnd([Date]),'YYYY-MM-DD') as [Weekname],
Then you can either use this field instead of your old week field or show it`s value in the text box with some condition like if(Getselectedcount(Week)=1,1,0).
For the textbox like:
2018-06-15,
16,
17,
18,
19,
20,
2018-16-21 - try this expression
if(Getselectedcount(Week)=1,weekstart(Date)& ,
&day(weekstart(Date,0,1))& ,
&day(weekstart(Date,0,2))& ,
&day(weekstart(Date,0,3))& ,
&day(weekstart(Date,0,4))& ,
&day(weekstart(Date,0,5))& ,
&weekend(Date),0)
Hope this will help)
AGB

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this in your text box:
=Week(DATE(floor([Active Date]), 'YYYY-MM-DD')) &': '& Weekstart (DATE(floor([Active Date]), 'YYYY-MM-DD')) & ' to '& Weekend(DATE(floor([Active Date]), 'YYYY-MM-DD'))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, Try this in text box:
Dual(Weekstart(Date)&'-'&Weekend(Date),week(Date))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks - ChatGPT didn't come up with your solutin that works!!!
