Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
proctors
Creator
Creator

Create Monday-Friday week column for grouping.

Im using one of the widely available Master Calendars available for QV but what our users need is a date formatted with such as Monday dash Friday foot each week. For example,
For 2019, we would have 1/7-1/11. Can we do this in the load script?
Labels (1)
  • Date

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Like this:

LOAD ...
Date, Date(WeekStart(Date) + 1, 'M/DD') & '-' & Date(WeekStart(Date) + 6, 'M/DD') as Week,
...
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Like this:

LOAD ...
Date, Date(WeekStart(Date) + 1, 'M/DD') & '-' & Date(WeekStart(Date) + 6, 'M/DD') as Week,
...
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
proctors
Creator
Creator
Author

This is great. Now, if I wanted to then create a Chart where the columns were the next 5 weeks(based off of today), how would I do that?

 

For example

 1/07-1/121/14-1/191/21-1/26
Person 1    
Person 2    
Person 3    
jonathandienst
Partner - Champion III
Partner - Champion III

Include the set expression in the table expressions. Something like this:

Sum({<Date = {">=$(=Today()) <=$(=Today()+35)"}>} ...
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
proctors
Creator
Creator
Author

Ok, so that gave me one column, however, I'm not sure how to make the weekly columns including the labels that you helped me create for the week. Also, what is the "35"?