Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi,
I have a few fields and I need to be able to have a total field for a year. i.e. If a user selects year 2008 regardless of anything else selected the field needs to show the total costs for 2008 or if the user selects 2009 it will show the total for 2009.
Any help would be appreciated.
Thanks.
 
					
				
		
Using Set analysis,
you can do a sum({1<Year={$(=only(YearField))}>} FieldToSummarize)
The number 1 will run the sum for every data whatever selection is.
By doing this be careful that performances are good ( Making a sum on all values can be longer, depending on the amount of data)
Hope this helps.
Rgds,
Sébastien
 
					
				
		
Thanks for your reply,
I am using 8.2, is set analysis for version 8.5, if so how would i obtain the same result in 8.2
thanks again
 
					
				
		
No I don't think it will work (check in your tutorial).
In this case you have to do Sum(ALL IF(Year=$(=only(Year)),FieldToSummarize,0))
Rgds,
Sébastien
 
					
				
		
Hi,
I have tried the following expression
Sum(ALL IF(Year= $(Year),MYCOST,0))
however it is only returning a '-' i.e. no data
what am i missing?
Thanks
 
					
				
		
I think you should replace Year = $(Year) by Year = $(=only(Year)).
