Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hello All ,
I am working on sales dashboard where it need to display previous year value in line chart where dimension is year.
Below is data which used to build the chart
Saleyear Saleqty
2007 100
2008 150
2009 180
2010 190
2011 175
2012 125
I have tried with set analysis but didn't work.
 
					
				
		
Hi,
If you take dimension as year and expression as salesqty then the line chart will show the data for all the years.. if you want to show only previous year value then use calculated dimension..
=max(year)-1
or based on selections you want show data for previous years means you have to create on variable and use that in calculated dimension..
=$(vyear)-1
 
					
				
		
 jagan
		
			jagan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Please find attached file.
Hope it helps you.
Regards,
Jagan.
 
					
				
		
As ur Requirement U want to display the data like below ryt?
Saleyear Saleqty
2007 -
2008 100
2009 150
2010 180
2011 190
2012 175
~ Kabilan K
 
					
				
		
 er_mohit
		
			er_mohit
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		use this expression
sum({$<saleyear={$(#=only(Saleyear)-1)}>}Saleqty)
hope it helps you
 
					
				
		
hi
try according to this,
Examples:
sum( {$<Year = {$(#vLastYear)}>} Sales )
returns the sales for the previous year in relation to current selection. Here, a variable vLastYear containing the relevant year is used in a dollar-sign expansion. 
sum( {$<Year = {$(#=Only(Year)-1)}>} Sales )
returns the sales for the previous year in relation to current selection. Here, a dollar-sign expansion is used to calculate previous year. 
hope it helps you.
 nirav_bhimani
		
			nirav_bhimani
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Try this.
For Current Year:
sum({<Year= {"$(=Max(Year))"}} >}Sales)
Last Year Sales:
Sum({<Year= {"$(=Max(Year)-1)"},Quarter=,Year=>}Sales)
2 Year Back 
Sum({<Year= {"$(=Max(Year)-2)"},Quarter=,Year=>}Sales)
Regards,
Nirav Bhimani
 
					
				
		
| Saleyear | Saleqty | LY Qty | 
|---|---|---|
| 2007 | 100 | 100 | 
| 2008 | 150 | 150 | 
| 2009 | 180 | 180 | 
| 2010 | 190 | 190 | 
| 2011 | 175 | 175 | 
| 2012 | 125 | 125 | 
 
					
				
		
didn' work for me .
Please see below I have given to Nirav Bhimani
 
					
				
		
didn't work . Please see reply given by me to Nirav Bhimani
