Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get last loaded value by date

Hello All, in QV I load different article prices in different time periods. Exampleerror loading image;

In QV this is loaded as below;

error loading image

What i want to do is in a QV Pivot table get the Min article price over YTD 2010, this I do as follows;

For reporting over period 2010-07

MIN (if (InYearToDate (TreatmentDate,'31-07-2010',[Price]))

And over 2010-05

MIN (if (InYearToDate (TreatmentDate,'31-05-2010',[Price]))

But I also want to get the last known price;

When reporting over period 2010-07, i want the result;

error loading image

And reporting over 2010-05, I want the result

error loading image

Can anyone help me out here?

Thanks in advance!

1 Solution

Accepted Solutions
Not applicable
Author

I tried this with

FirstSortedValue(Price,-TreatmentDate)

I think it should be something like this, but above isn,t working yet. anyone a hint?

View solution in original post

6 Replies
Not applicable
Author

Can anyone help me out here please, I'm stuck.

Not applicable
Author

Hi,

please see the attached example (Script).

Good luck!

Rainer

Not applicable
Author

This is a solution if you only want to see it for 1 date. But if you want to have selection possibilities for the date it is not working anymore

Not applicable
Author

anyone else another hint?

Not applicable
Author

I tried this with

FirstSortedValue(Price,-TreatmentDate)

I think it should be something like this, but above isn,t working yet. anyone a hint?

Not applicable
Author

Above is working now!!Geeked. I looked at aggregated level first, then the function runs into multiple values and it doesn't return anything, but if you go to n-level it is working fine