Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 abhijain
		
			abhijain
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,
Please suggest me how to show my chart on the basis of only previous two months selections with respect to the current year and else hide my chart.
 Gysbert_Wassena
		
			Gysbert_WassenaHere's a version that does what you want:
 
					
				
		
 Siva_Sankar
		
			Siva_Sankar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You assign a value to a variable that contains the condition you wish to evaluate. Button Properties Actions->Add Action->External Set Variable Then within the chart properties Layout tab -> Show -> Conditional, you write an expression and check the value of the variable.
 
					
				
		
Hi,
Maybe you could check this one.
The attached file shows that whenever you choose previous 2 months based on current year, the chart will show up, else the chart will hide.
Regards,
Janzen
 
					
				
		
 abhijain
		
			abhijain
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Thanks but i want that chart should hide when current year is no selected as i want to show the chart when only current year and previous two months are selected.
 
					
				
		
Hi,
Please see updated.
Regards,
Janzen
 
					
				
		
 abhijain
		
			abhijain
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks for ur support but actually on selections of year and month i want the chart to get displayed or hide .And i dont need buttons
 Gysbert_Wassena
		
			Gysbert_WassenaHere's a version that does what you want:
 
					
				
		
 abhijain
		
			abhijain
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I want that chart should only be shown when current year and only previous two months are shown
 
					
				
		
 vlad_komarov
		
			vlad_komarov
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If I got it right: you want to show your chart only if you have last two months selected in your calendar, correct?
You can create few flags in your Calendar table:
,if (((monthstart($(vToday), -3) <= FullDate) and (monthstart($(vToday), 0) > FullDate)), 1, 0) as Last2MonthsFlag
,if (inyeartodate(FullDate, date($(vToday)), 0), 1, 0) as CYTD_Flag // current Year-to-Date
and use these flags to show/hide your chart.
Good luck,
Vladimir
 
					
				
		
 abhijain
		
			abhijain
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Actually i need to add the expression in the chart layout itself. Now the problem is when i select current year and a previous month the chart appears but when i select current year and two previous month the chart disappears but i want that chart should appear in this case also when i select current year and more the one previous month together.
