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

nth Value from the list box

Hi,

I have requirement to create a straight table based on date range dependent on value selected from the DATE listbox & the nth previous date from selected date in listbox. I have attached sample qvw. Thank you for help.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Define a variable like:

vNthDate =Date(Max({<DATE={"<=$(=Date(Max(DATE)))"}>}DATE,vNthRow))

Then expression like:

SUM({<DATE={">=$(vNthDate) <=$(=Date(Max(DATE)))"},STATUS={'F'}>}VALUE)

Capture.JPG

View solution in original post

2 Replies
tresesco
MVP
MVP

Define a variable like:

vNthDate =Date(Max({<DATE={"<=$(=Date(Max(DATE)))"}>}DATE,vNthRow))

Then expression like:

SUM({<DATE={">=$(vNthDate) <=$(=Date(Max(DATE)))"},STATUS={'F'}>}VALUE)

Capture.JPG

miranrai
Contributor III
Contributor III
Author

When we look too hard we miss out whats most easy way.! I racked all rank, aggregate & it was most simple max function. Thank you so much Tresco