Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewchong
Contributor
Contributor

Vertical Reference Line on Line Chart with Non-numeric X-axis

I have a line chart where the X-Axis is a label and looking to have vertical reference lines.

Goal.jpg

Some background:

  • - Week IDs have a paired Week label
  • - Currently using only the week label field as a dimension, disables the ‘Continuous x’ option in Properties > Presentation > Reference Lines needed to add a vertical line
  • - Setting ‘Continuous’ in Properties > Axes to enable the ‘Continuous x’ option above, removes the data since the week label is text and not numeric
  • - Changing the dimension to use week ID vs label allows the above options to be selected and add the vertical reference line (on sheet ‘Sheet3’)

sample.jpg

Does anyone have any clever tips on how I could leverage the ID’s on the x-axis, but display the ID’s associated labels instead? Any help is appreciated.

Attached is my QVW.

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like this (the dimension should be created in the script with an underlying numeric date value, then format the x-axis dimension values on number tab).

View solution in original post

4 Replies
swuehl
MVP
MVP

Create your dimension values as dual values:

Data Types in QlikView

swuehl
MVP
MVP

Maybe like this (the dimension should be created in the script with an underlying numeric date value, then format the x-axis dimension values on number tab).

matthewchong
Contributor
Contributor
Author

Thanks swuehl! Looks like I need to convert this into a date field to achieve what I'm looking for.

Appreciate the response!

Anonymous
Not applicable

Hi,

I just stumbled upon your solution. She has helped me before, thank you very much! The problem I have is:

If I read my dimension as date#(weekyear, 'DD-YYYYY') (weekyear is dual and e.g. 43-2017) and then display it in the back of the number tab, then it goes to e.g. 31-2017 and starts again at 01-2017. Sure, because DD stands for the days and there are no more than 31 days. I already tried to read it as timestamp#(weekyear, 'mm-YYYYY') (since there are 60 minutes and only 52 weeks should be enough) but that doesn't really work. Do you have any ideas with which I can display the weeks larger than 31 correctly?