Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Reference line/Grid for a day in a week

Hi

I'm trying to add a grid/reference line for every Monday for my Gantt chart.

The chart is similar to the one show blew.  (Photo copied from Henric Cronström's post.Files for creation of a Gantt chart )

I would like either make the grid showing every Monday or add a reference line for every Monday.

Any idea how to achieve that?

Here's some sample data if you'd like to try.

Thanks!

Capture.PNG

sample data

Job ID

Time Started

Time Completed

1

August 16, 2015 at 9:54 AM

August 19, 2015 at 9:21 PM

2

August 20, 2015 at 5:55 PM

August 21, 2015 at 3:44 AM

3

September 8, 2015 at 4:49 PM

September 8, 2015 at 5:02 PM

10 Replies
Not applicable
Author

one suggestion would be to write an expression using set analysis for day of the week is monday

weekday(date)

Week day. Returns an integer between 0-6.

Example:

weekday( '1971-10-30' ) returns 5.

If the date format used does not correspond to the one set in your operating system, QlikView will not be able to make a correct interpretation. See above under day(date).

Anonymous
Not applicable
Author

Ok. After I get the workday(date). How do I add the reference line/grid to the chart?

Thanks

Not applicable
Author

go to the Presentation tab for the chart and in the Reference Line section add the expression you just wrote

what you can do is create a variable that is the result of your date function and use the $ expansion for the variable in the reference line expression

in the attahced, my expression is my variable as described above

Digvijay_Singh

I tried like attached, but it is not showing reference line, may be the displayed date in Expression Axis by QV is not falling on Monday, but not sure of. This qvw could be used as starter for further R&D

181000.PNG

Not applicable
Author

as you can see in the attached, it does not look like there are any monday dates.  Also, according to the documentation I was actually expecting a number (0-6) to be returned

Anonymous
Not applicable
Author

I'm not sure if it matters whether my data has Monday or not. My goal is to have Mondays somehow indicated in the chart as a reference line or in the grid...

Not applicable
Author

I agree

not sure why it is not working unless reference lines only work based on Expressions and not dimensions

Not applicable
Author

It might have something to do with the X Axis option not being enabled so it is basing the line on the Y axis

Not applicable
Author

it does not appear to be working the way I had hoped.  I someone else can assist, it would be greatly appreciated