Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 bhargav_bhat
		
			bhargav_bhat
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
We have a requirement in Qliksense where on selection of any month in month filter it should show previous 12 months data in the graph
for example if we select Jul 2017 it should show from Jul 2016 to Jul 2017 as shown below
Needed help to acheive this requirement
Regards,
Bhargav
Is there any challenge you faced using?
Sum({<MonthYear = {">=$(=AddYears(Max(MonthYear), -1)) <=$(=Max(MonthYear))"}>} Sales)
Is there any challenge you faced using?
Sum({<MonthYear = {">=$(=AddYears(Max(MonthYear), -1)) <=$(=Max(MonthYear))"}>} Sales)
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		He might have to make sure that the formatting within the set analysis is right and also make sure to not have spaces between ranges....So what I mean is this
Have this
>=blahblah<=blahblah
Instead of
>=blahblah <=blahblah
 
					
				
		
 pradosh_thakur
		
			pradosh_thakur
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		is there no need of changing to 'MMM YYYY' format?
 
					
				
		
 bhargav_bhat
		
			bhargav_bhat
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Anil,
As per requirement,we do not have to sum up the 12 months data . we just need to have data in graph for previous 12 months in graph.The issue is that on selection of a month in month filter it shows data for single month only in graph
Regards,
Bhargav
May be Only() helps here
Only({1<MonthYear = {">=$(=AddYears(Max(MonthYear), -1))<=$(=Max(MonthYear))"}>} Dimension)
Update - As suggest by sunny
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		When you say Month is it the same field as your dimension? which include Month and Year or is this a separate field from MonthYear? Can you share the name of your fields? and the expression you are using right now?
I believe, He can manage with Format or he will surf in google 
 
					
				
		
 bhargav_bhat
		
			bhargav_bhat
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Sunny,
Thanks for Replying
The expression is working fine in the graph
Regards,
Bhargav
