Discussion Board for collaboration on QlikView Layout & Visualizations.
The following example illustrates my problem.
For my graphs I want to display the stock for each day. In table form my intention looks as follows:
How can I make an expression so only the latest value of a date is selected?
Go to Solution.
For Expression side
try this one
LOAD date(Date#(Dt,'DD-MM-YYYY'),'DD-MM-YYYY')AS DT,* INLINE [
Dt, SM, Stk
10-04-2013, +10, 20
10-04-2013, +10, 30
10-04-2013, +10, 40
14-04-2013, +40, 80
14-04-2013, +40, 120
take a dimension DT in pivot table and add expression
FirstSortedValue(aggr(max(Stk),SM),-aggr(DT,SM)) // For Stock
hope it helps you
required to get max time on perticular date.
Can you explain me how i can use this? Cause i dont understand. Right now im trying the following, with not good results. (used in chart expression
sum(aggr(FirstSortedValue(Stock, -Date),Date, Stock))
I am trying this, and it starts to look more like it. But still alot of values are not visible.
Try this in script
LOAD date(Date#(DAte,'DD-MM-YYYY'),'DD-MM-YYYY')AS date,* INLINE [
DAte, StockMutation, Stock
LOAD max(Stock) as Lateststock,date
Group by date;
and in pivot table take date as dimension
and in expression write Lateststock
Thank you, i feel like im almost there.
The problem is, i dont want to sort on value, but really on date. so the latest value in the list. The value can also be lower than the first value.
Im sorry i didnt state this clear in the beginning
then try this one
Group by StockMutation;
And how would the expression look like?