Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

Set Analysis max date

Hi community,

I have a  pivot table which displays by task the quantity presented in DTD over a selected period and I would like to display the quantity of Stock recorded at the end of the last working day.



i'm using this set analysis : SUM({$< %Date =  {'=Max(%Date)'}>} [Qté Stock] )

but it's not working, do someone know why ?


For exemple :

my data looks like this :


        

Task IDTask Desk %DateDTDDMTDTD Needed ETP StockStock Needed ETP
T01Task 105/03/201815000:03:001,03002,0
T02Task 2 05/03/201820000:01:000,44000,9
T03Task 305/03/201810000:05:001,12002,2
T04Task 405/03/201815000:03:001,03002,0
T05Task 505/03/201823800:01:000,54761,1
T06Task 605/03/201825400:01:300,85081,7
T07Task 705/03/2018100000:03:006,7200013,3
T08Task 805/03/20182500:01:300,1500,2
T09Task 905/03/2018325600:01:3010,9651221,7
T10Task 1005/03/201810000:01:300,32000,7
T01Task 106/03/20185000:03:000,31000,7
T02Task 2 06/03/20183000:01:000,1600,1
T03Task 306/03/201815000:05:001,73003,3
T04Task 406/03/201820000:03:001,34002,7
T05Task 506/03/201810000:01:000,22000,4
T06Task 606/03/20182300:01:300,1460,2
T07Task 706/03/20185000:03:000,31000,7
T08Task 806/03/201850000:01:301,710003,3
T09Task 906/03/201820000:01:300,74001,3
T10Task 1006/03/20185000:01:300,21000,3


> I need to show only the Last Worked Day Stock Qty and the sum of DTD so the results should looks like :

      

Task Desk DTDDMTDTD Needed ETP StockStock Needed ETP
Task 120000:03:001,31000,7
Task 2 23000:01:000,5600,1
Task 325000:05:002,83003,3
Task 435000:03:002,34002,7
Task 533800:01:000,82000,4
Task 627700:01:300,9460,2
Task 7105000:03:007,01000,7
Task 852500:01:301,810003,3
Task 9345600:01:3011,54001,3
Task 1015000:01:300,51000,3

Thanks for your help

Marwen

1 Solution

Accepted Solutions
Highlighted

Try this

Sum({$<%Date = {"$(=Max(%Date))"}>} [Qté Stock])

or this

Sum({$<%Date = {"$(=Date(Max(%Date), 'MM/DD/YYYY'))"}>} [Qté Stock])

View solution in original post

4 Replies
Highlighted

Try this

Sum({$<%Date = {"$(=Max(%Date))"}>} [Qté Stock])

or this

Sum({$<%Date = {"$(=Date(Max(%Date), 'MM/DD/YYYY'))"}>} [Qté Stock])

View solution in original post

Highlighted
Master III
Master III

Try

sum({<%Date={'$(=Maxstring(%Date))'}>}Stock)

or

sum({<%Date={'$(=Max(%Date))'}>}Stock)

Highlighted
Master
Master

Try this

SUM({$< %Date =  {"$(=Max(%Date))"}>} [Qté Stock] )

Highlighted
Creator II
Creator II

Thanks Sunny !

it worked with Sum({$<%Date = {"$(=Max(%Date))"}>} [Qté Stock])