Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
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%.

Labels (1)
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