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

Line Chart with dynamic selection displaying two series

Hello fellows,

I have a data table with the attributes (date, X, Y):

Date,              X,        Y

8-Feb-14         1         0.4343

8-Feb-14         2         0.4311

8-Feb-14         3         4343

8-Feb-14         4         65

8-Feb-14         5         67.5

7-Feb-14         1         0.555

7-Feb-14         2         0.656

7-Feb-14         3         111

7-Feb-14         4         22

7-Feb-14         5         657.5

The user can select a date.

Now I'm trying to build a line chart displaying two series of (x,y) values, one for selected date and one for previous date. While building first series was quite obvious, creating an expression for second one is not straightforward.

The (potential) algorithm is to:

- get selected date

- calculate previous date (if not available, try one before)

- get (x,y) values for previous date

Any suggestions, please?

4 Replies
luis_pimentel
Partner - Creator III
Partner - Creator III

For your second expression, try something like:

sum({< [Date]= {"$(=date(max([Date])-1))"}>} )

Not applicable
Author

Luis,

What if I don't need 'sum' of values, but rather values themselves?

luis_pimentel
Partner - Creator III
Partner - Creator III

could you share a snapshot of your actual line chart, with the current selection date expression?

Not applicable
Author

Chart displaying (x,y) (interest rate, maturity) data:

1.png

Expression I'm trying to build:

2.png