Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
wardzynski
Creator
Creator

Calculating consecutive losses using above() function in a Chart

I am trying to use the above function, but I do not get any values using this

above(sum(Profit),1,3) for the Column: Consecutive. I dont understand why?

DanielP_2017Sep15_4.28.33 AM_0003.png

It only works when I use above(sum(Profit),0,3)

DanielP_2017Sep15_4.29.57 AM_0004.png

I do not understand why the above() function behaves like this?

What I would like to achieve is calculating how many consecutive losses I get, so this is what I would like to see:

DanielP_2017Sep15_4.28.33 AM_0003_desired.png

1 Reply
antoniotiman
Master III
Master III

Hi Daniel,

You can use an Expression like this

If(Sum(Profit) > 0,0,Above(Column(1))+1)

Regards,

Antonio