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: 
ingoniclas
Creator II
Creator II

Only values associated with most current loaded date

Hi there,

I am desperately looking for a solution to this issue: I want to filter only for those values associated with the most current loaded date. For example when 1st March 2013 ist the most current date loaded, I want to filter for only those values associated with this date. The result should look like this:

date                    value

01-03-2013          A

01-03-2013          C...

I tried it with max(date) and firstsortedvalue(date,-date), but this brings up ALL values with their most current dates like this:

date                    value

01-03-2013          A

01-01-2013          B

01-03-2013          C...

Does anyone know how to solve this issue in script or charts? Thanks!

1 Solution

Accepted Solutions
luciancotea
Specialist
Specialist

=if( max(Date) = max(ALL Date), 1, 0)

View solution in original post

4 Replies
luciancotea
Specialist
Specialist

=if( max(Date) = max(ALL Date), 1, 0)

Gysbert_Wassenaar

You could create a variable vMaxDate: =max({1} date)

Then you can use the variable in expressions. For example sum({<date={'$(vMaxDate)'}>} value)


talk is cheap, supply exceeds demand
ingoniclas
Creator II
Creator II
Author

Thanks. That sounds very good. Where and how do you have to put in that statement? I tried to add Let vMaxDate =max({1} date) right after the system variables but it doesn't work this way. Unfortunately, I am not so familiar with variables, can you help? Thanks.

ingoniclas
Creator II
Creator II
Author

This worked fine in the charts, thanks! Do you also have an idea how this can be achieved in the script?