
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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’)
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.
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create your dimension values as dual values:


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks swuehl! Looks like I need to convert this into a date field to achieve what I'm looking for.
Appreciate the response!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
