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: 
sunilkumarqv
Specialist II
Specialist II

first instance of negative value based on selection of particular date.

Hi ,

Below is the data table containing Date and Value.

Date                   Value

30-Apr-14            1000

31-May-14          -3500

30-Jun-14            6000

31-Jul-14            -5000

31-Aug-14          -8000

30-Sep-14          -6700

31-Oct -14          9000

Need your help in getting the first instance of negative value based on selection of particular date.

For eg.:

When 30-Apr-14 is selected, it should show the value -3500 as it is the first instance of negative value after 30-Apr-14. When 31-Jul-14 is selected, -8000 should be shown, etc.

How can this be achieved inside an expression?

Thanks in advnce.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Perhaps with FirstSortedValue({<Value={'<0'},Date={'>$(=max(Date))'}>}Value , Date)

See attached qvw.


talk is cheap, supply exceeds demand

View solution in original post

1 Reply
Gysbert_Wassenaar

Perhaps with FirstSortedValue({<Value={'<0'},Date={'>$(=max(Date))'}>}Value , Date)

See attached qvw.


talk is cheap, supply exceeds demand