Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
montubhardwaj
Specialist
Specialist

How to get Vertical reference lines parallel to Y axis ?

Hi folks,

I am having little problem displaying Reference lines parallel to Y axis. Here is the description:

I have a filed "Month" which holds data for 3 years (in format like Jan-10 through Dec-10,Jan-09 through Dec-09,Jan-11-Dec-11).I want to plot expression (say Sum(Sales)) against this dimension and it is working all fine. Now I want to have reference lines at the end of each year i.e. on Dec-09, and Dec-10 . The "Month" field in not a calculated dimension and is directly from DB.

I have attched the sample layout below.Need your suggestions.

error loading image

1 Solution

Accepted Solutions
kji
Employee
Employee

This is probably due to not having enough space to print each month without texts overlapping, if you make chart wider i think all months will appear.

View solution in original post

22 Replies
shumailh
Creator III
Creator III

Have you tried YearEnd() function on your reference line?

Regards,
Shumail Hussain

kji
Employee
Employee

Assuming you are using a continuous X-axis which it looks like from your example, on your reference line make sure location is set to continuous X.

montubhardwaj
Specialist
Specialist
Author

Hi Shumail,

I have tried that too but then graph is disappearing and I am getting the error saying "No Numeric values on X-axis" .... Any thing else ???

montubhardwaj
Specialist
Specialist
Author

Hi Johan,

Yes! Location is set to continuous X only.... but no luck Sad

montubhardwaj
Specialist
Specialist
Author

Also one more weird thing is happening. As soon as I am selecting "Continuous" on Axes, the graph is not displaying anything and saying "No Numeric values on X-axis" . so that mean my Dimension is not continuous ??? How to solve this ?

kji
Employee
Employee

Sounds like your X-dimension is using string values, not numeric values. Check in the script if you can read it as dates instead, or if that information is already available in some other field.

montubhardwaj
Specialist
Specialist
Author

You are right Johan. My X-dimension is using string values like Jan-10,Feb-10 etc. And i need to use this only in the dimension. So can we change somehow this field to Numeric or to continuous ?

jonathandienst
Partner - Champion III
Partner - Champion III

Load month using

Date(Date#([Month], 'MMM-YY'), 'MMM-YY') AS [Month]

This will give you a numeric date in the same format.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
montubhardwaj
Specialist
Specialist
Author

Jon,

Thx for giving it a shot. But by using the above formula also, I am not getting desired result Sad

this is again giving me date as I alrady have .