Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
seb04
Contributor
Contributor

Ignoring a date selection but needs the date for computation

Im trying to create a line chart. I have a data with Date field and another column with numeric value called RSI30. Regardless of the value selected in the Date column, i would like to return the last 10 most recent values of RSI30. I'm a newbie in set expression and qliksense but i gave it a go.

Here is what I came up with

=Sum({<Date = {" =Date > $(=Max({<[Date]>} Date)-10)"}>} RSI30)

The above formula works when there is no date selection. However when I select a date, only that current date is being shown in the line chart.

After reading some documentation, i tried this

=Sum({<Date= >} RSI30)

This works because the line chart is not being affected by any changes in the selection of the date field. However, I have 2 years worth of data, so the line chart is showing the same. I would only need to show the last 10 recent RSI30 values. Any assistance is greatly appreciated. Thanks. 

 

Labels (2)
2 Replies
anat
Master
Master

Sum({<Date=,Date = {" =Date > $(=Max({<[Date]>} Date)-10)"}>} RSI30)

seb04
Contributor
Contributor
Author

I tried this but unfortunately it is not working. It is giving a message

"The chart is not displayed because it contains only undefined values."