Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

SetAnalysis

Hi Guys,

error loading image

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


5 Replies
pover
Luminary Alumni
Luminary Alumni

Suming expression values with exist within the same dimension value is done by using Total. For example:

sum(Total <ActivityDefinitionId> Output)

Regards

Not applicable
Author

Hello carl,

can you change my expression with Total? I am not getting the syntax right.

Thanks for ur answer

Sravan

pover
Luminary Alumni
Luminary Alumni

Does this work?

([set (pcs/sec)]* ActivityDuration - sum(Total <ActivityDefinitionId> Output))*StandardValueAddedTime

Not applicable
Author

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

Not applicable
Author

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)