Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		
Hello Friends,
Can you please let me know how can we use aggr fun with in Set Analysis?Any manual or examples will be really helpful.
Thanks
KC
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If your Currency in dimension, try like:
=FirstSortedValue(Aggr(Sum(rates),Date), -Date) // If multiple rates are there for a date
=FirstSortedValue(rates, -Date) // when sigle rate for a date
Edit: The first exp, probably should be like: =FirstSortedValue(Aggr(Sum(rates),Currency,Date), -Date)
 
					
				
		
 amit_saini
		
			amit_saini
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Kc,
This may help you.
Thanks,
AS
 vikasmahajan
		
			vikasmahajan
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		PFA documents on AGGR,
Vikas
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Set analysis evaluates once for an object while aggr() is more frequently used in chart to manupulate the normal dimension filter effect. Hence, use of aggr() in set analysis is not that usual. And, probably there is no such document. If you could explain your requirement with sample data, may be people here could help of better.
 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Tresesco,
Iam just try to do this:
sum({<Date={"=Aggr(max(Date),Currency)"}>}rates)
I have Currency and Dates & rates corresponding to that.So i was trying to get the Rates when Date is max corresponding that Currency. Same Currency have different Rate corresponding to different dates.
Regards
KC
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		If your Currency in dimension, try like:
=FirstSortedValue(Aggr(Sum(rates),Date), -Date) // If multiple rates are there for a date
=FirstSortedValue(rates, -Date) // when sigle rate for a date
Edit: The first exp, probably should be like: =FirstSortedValue(Aggr(Sum(rates),Currency,Date), -Date)
 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks Tresesco,
So we cant use Aggr function with in Set analysis ? And expression above is wrong ?
 tresesco
		
			tresesco
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		We can, but it would not produce the desired result. Aggr() withing set analysis doesn't get evaluated multiple times (you might expect as many times as number of field values), it would just work for the first value(load order) of the field.
 
					
				
		
 jyothish8807
		
			jyothish8807
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Got it  .Thanks a lot tresesco.
 .Thanks a lot tresesco.
Regards
KC
