Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max Aggr value regardless of selection in field! Please Help!

Hi All

I have the following formula that gives me the period with the maximum value:

[CODE]=max(aggr(Sum({$<[4AN - Level 4 Account Name] = {'Non Pay Costs'},Period={'*'}>} Actuals*LY1_Flag),Period))

Problem is I want this to stay the same regardless of any selection in the Period field, I added the Period={'*'} to the set analysis in the hope that this would work but something with the aggr means it still only gives me the max of the current;y selected periods.

Please can anyone advise a way to fix this or do it in another way?

Thanks

Dominic

1 Solution

Accepted Solutions
Not applicable
Author

To ignore the selection on Period, add Period= with no Set Modifier to your Set Analysis.

=max(aggr(Sum({$<[4AN - Level 4 Account Name] = {'Non Pay Costs'},
Period=>} Actuals*LY1_Flag),Period))


EDIT: Since you have two aggregate functions, you may need to add Period= to your Max as well. I'm not sure, but if that one doesn't work, you may want to put your Set Analysis in the Max too.

=max({<Period=>}aggr(Sum({$<[4AN - Level 4 Account Name] = {'Non Pay Costs'},
Period=>} Actuals*LY1_Flag),Period))


View solution in original post

2 Replies
Not applicable
Author

To ignore the selection on Period, add Period= with no Set Modifier to your Set Analysis.

=max(aggr(Sum({$<[4AN - Level 4 Account Name] = {'Non Pay Costs'},
Period=>} Actuals*LY1_Flag),Period))


EDIT: Since you have two aggregate functions, you may need to add Period= to your Max as well. I'm not sure, but if that one doesn't work, you may want to put your Set Analysis in the Max too.

=max({<Period=>}aggr(Sum({$<[4AN - Level 4 Account Name] = {'Non Pay Costs'},
Period=>} Actuals*LY1_Flag),Period))


Not applicable
Author

Sweet thanks! I did have to add the set analysis to the Max bu that worked really well. Big Smile