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

How to get the latest value?

Hi guys

Please see attached excel sheet.

I have products which has been receipted at different dates and at different costs.

I have used the following Expression to calculate the cost at which a product was receipted for a specific month.

((sum({$<Year = {$(=max(Year) - $(=if(max(Month) = 1, 1, 0)))}, Month = {$(=month(addmonths(max(MonthYear), -1)))}>} LineTotal))/

(sum({$<Year = {$(=max(Year) - $(=if(max(Month) = 1, 1, 0)))}, Month = {$(=month(addmonths(max(MonthYear), -1)))}>} (Quantity*BVolume))))*(BVolume)

Now I have a very neat table that shows me the breakdowns per month as you will see on the Excel sheet.

What I want to know, is there a way that Qlikview can show me that latest cost. In other words, Qlikview will have to look in which month the product was last receipted.

Thus for example: If there is no value in November, it must give me the value of October etc.

Any help would be appreciated.

Regards





1 Solution

Accepted Solutions
Not applicable
Author

Please find attached the solution[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/3225.latestvalue_5F00_solution.zip:550:0]

View solution in original post

2 Replies
Not applicable
Author

Please find attached the solution[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/3225.latestvalue_5F00_solution.zip:550:0]

Not applicable
Author

check attached qvw file......