Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kunkumnaveen
Specialist
Specialist

how to write max yoy value expression in a textbox

How All,

                  I have to display max YOY increase value

Untitled.png

to get max YOY increase value which is (67%) in 2016 i wrote below expression in text box ,but i am getting -0 value

Expression:  =num(Max(Aggr((Sum(value)-Above(Sum(value)))/Above(Sum(value)), year)),'###0')

some thing is wrong with this expression

can any suggestion plz



thanks


22 Replies
prma7799
Master III
Master III

It will show according to your values

like if 2015 values 1200 and 2016 value 1000 then  is shows you - 50%.

kunkumnaveen
Specialist
Specialist
Author

Exactly , that is what i mean ,i was asked to show max value in the chart irrespective of years,

what i mean is if 2015 value more then 2016 value then i was told to display 2015 value

or

if 2016 value is greater then 2015 value then i need to display 2016 value ......

i known it doesn't make sense ,but what we can do client is looking so

prma7799
Master III
Master III

You want value or YOY please specify clearly .... or share some expected output.

sunny_talwar

Do you have QV12 by any chance? If you do, you can use The sortable Aggr function is finally here!‌ like this

=Num(Max(Aggr((Sum(value)-Above(Sum(value)))/Above(Sum(value)), (year, (NUMERIC)))),'###0.00%')

kunkumnaveen
Specialist
Specialist
Author

sorry my apologies ,i mean to say YOY value  which is in percentage

tresesco
MVP
MVP

naveen kumar wrote:

i known it doesn't make sense ,but what we can do client is looking so

But I don't really agree. It makes complete sense to me. Business can always ask to see the maximum figure sold across years. You just have to use the right expression. Using QV 12 + or Qlik sense 2.2+ you can try like:

=Num(Max(Aggr((Sum(value)-Above(Sum(value)))/Above(Sum(value)), (year,(NUMERIC, ASCENDING)))), '#,##0%')

Now with qv 12, you can use sorting within aggr() itself.

Capture.PNG

kunkumnaveen
Specialist
Specialist
Author

Hello Sunny,

                         i am working on Qliksense 3.0

sunny_talwar

Then this should work for you without any issues

=Num(Max(Aggr((Sum(value)-Above(Sum(value)))/Above(Sum(value)), (year, (NUMERIC)))),'###0.00%')

kunkumnaveen
Specialist
Specialist
Author

i am using Qliksense

sunny_talwar

Naveen, like I mentioned, this will work in Qlik Sense