Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hello everyone,
I am trying to create a bar chart where i would like to display data from the current year by category, but it should be dynamic, user can view other years by clicking in the filter:
I am just using the field name in my expression, and using the field "Category" as a dimension.
I can´t use triggers, once it will set the rule for all objects in my sheet.
So, how can i create the rule to display the current year in my chart?
Thanks
 
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Add this to your expression's set analysis:
{<Year = {"$(=Max(Year))"}>}
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		or this:
{<Year = {"$(=If(GetFieldSelections(Year) = 0, Year(Today()), Max(Year)))"}>}
 
					
				
		
Hi Sunny,
The name of the field for Year is "Ano".
Should i use the name of the field in the expression you suggested, or should i use "Year" exactly how you wrote?
Thanks
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		So something like this:
{<Ano= {"$(=Max(Ano))"}>}
or
{<Ano= {"$(=If(GetFieldSelections(Ano) = 0, Year(Today()), Max(Ano)))"}>}
 
					
				
		
 silambarasan
		
			silambarasan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		{Year={$(=max(Year))}>}
 
					
				
		
 Mark_Little
		
			Mark_Little
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Or you can try something like {Ano={$(vYear)}}
Create a variable vYear -
Year(Today())
Mark
 
					
				
		
Thanks for your quick answer!
Should i have 2 expressions in my chart?
One for the dimension and another for the set analyses?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		No you just need one expression. What is your current expression?
 
					
				
		
I have two situations:
1) A chart that displays the sum of the field "Occupants" by category
2) A chart that displays the percentage of "Occupants" by category.
Both charts should display data from the current Year.
 
