Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi Guys,
I wanted to group all the ActivityDefinitionId which are same(124) in the Below SetAnalysis Formula. How can do it?
([set (pcs/sec)]* ActivityDuration - sum({$<ActivityDefinitionId}>}Output))*StandardValueAddedTime
 
					
				
		
 pover
		
			pover
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Suming expression values with exist within the same dimension value is done by using Total. For example:
sum(Total <ActivityDefinitionId> Output)
Regards
 
					
				
		
Hello carl,
can you change my expression with Total? I am not getting the syntax right.
Thanks for ur answer
Sravan
 
					
				
		
 pover
		
			pover
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Does this work?
([set (pcs/sec)]* ActivityDuration - sum(Total <ActivityDefinitionId> Output))*StandardValueAddedTime
 
					
				
		
Hello Karl,
It works but one more extension
sum({<ProductCategory = {'G'}>}ActivityDuration*([set (pcs/sec)])-(sum(Total <ActivityDefinitionId> Output))*StandardValueAddedTime)/sum({<ProductCategory = {'G'}>} ActivityDuration)
some comma somewhere is wrong I guess or ')' can you help me?
Thanks in Advance
sravan
 
					
				
		
You are using Sums inside another Sum function. That does not work. If you need the nested Sums, you must use the Aggr() function.
When using the Aggr() function, you will need to define the dimensions you wish to aggregate by. Maybe something like this:
sum({<ProductCategory = {'G'}>} Aggr(
ActivityDuration*([set (pcs/sec)])-
(sum(Total <ActivityDefinitionId> Output))*
StandardValueAddedTime, ActivityDefinitionId))
/sum({<ProductCategory = {'G'}>} ActivityDuration)But I think you will need to add each dimensions in your chart as parameters to the Aggr() function:
sum({<ProductCategory = {'G'}>} Aggr(
ActivityDuration*([set (pcs/sec)])-
(sum(Total <ActivityDefinitionId> Output))*
StandardValueAddedTime, ActivityDefinitionId, OtherDim, OtherDim2))
/sum({<ProductCategory = {'G'}>} ActivityDuration)