4 Replies Latest reply: Aug 4, 2015 6:52 AM by Sunny Talwar

Max percent of Top 5 differences as expression

Hello,

I need a expression to calculate the max percent of the Top 5 differences.

So I found a solution to calculate the Top 5 differences, but not the max percent.

In the attached example, I have to calculate the 70%.

• Re: Max percent of Top 5 differences as expression

May be this in a text box object:

=Num(Aggr(If(Rank(Sum({<Year = {2015}>} Sales) - Sum({<Year = {2014}>} Sales), 0, 1) = 3, (Sum({<Year = {2015}>} Sales)-Sum({<Year = {2014}>} Sales))/Sum({<Year = {2014}>} Sales)), Dim), '##%')

• Re: Max percent of Top 5 differences as expression

I found the solution with your help. It is:

=Max(Aggr(If(Rank(Sum({<Year = {2015}>} Sales) - Sum({<Year = {2014}>} Sales), 0, 1)<= 5, (Sum({<Year = {2015}>} Sales)-Sum({<Year = {2014}>} Sales))/Sum({<Year = {2014}>} Sales)), Dim))

Thank You.

• Re: Max percent of Top 5 differences as expression

Awesome

I am glad you were able to find a solution and I was able to guide you towards finding one.

Best,

Sunny