Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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%.

4 Replies
Not applicable
Author

sunny_talwar

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), '##%')

Not applicable
Author

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.

sunny_talwar

Awesome

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

Best,

Sunny