Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 montubhardwaj
		
			montubhardwaj
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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.
 
					
				
		
 jonathandienst
		
			jonathandienst
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Can you upload something so we can have a look at it?
 
					
				
		
 montubhardwaj
		
			montubhardwaj
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I have attached a sample apps.... in this I am using Months and Sales.I want the refrence lines parallel to Y axis when a year ends i.e. at Dec-10 and Dec-11, it should show two lines.
Thanks fr giving it a shot.
 
					
				
		
 jonathandienst
		
			jonathandienst
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		OK, got it working with reference lines up to two years. See if this is what you want.
I have included a straight table that shows how you need to handle dates if they are in string format like in this example.
I would convert the Month field to proper dates durng the load as I suggested in a previous post. This would make the expressions on the reference bars a lot simpler.
You will notice that the dimension of the chart is now a calculated value that converts the string to a date, and the x axis is continuous.
The reference bar expression calculate the minimum year and paint a bar at min rank 0 and min rank 1. The '- 15' paints the reference lines between the bars on the chart.
Jonathan
 
					
				
		
 montubhardwaj
		
			montubhardwaj
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 jonathandienst
		
			jonathandienst
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Set the number format for the "Continuous X-axis" in the chart Properties | Number tab to the date format you need.
Jonathan
 
					
				
		
 montubhardwaj
		
			montubhardwaj
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 kji
		
			kji
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Make sure your sort-order for the Dimension is Numeric
 
					
				
		
 montubhardwaj
		
			montubhardwaj
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Finally...!!!! Got it guys... Thx Jona and Johan and all u member for ur help....!!!
Jus small doubt, after getting reference lines successfully, Month are appearing like Jan-10,Mar-10,May-10,Jul-10 etc i.e it is skipping one month in between. I dont have any problem with this but just asking out of curiosity 
 
					
				
		
 kji
		
			kji
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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.
 
					
				
		
 lmonincx
		
			lmonincx
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Jonathan, Can you tell how you managed to get the X- axis working, in my qvw it's greyed and i can't get it selectable in a barchart?
Kind regards,
Linda
