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: 
Not applicable

Semi additive measure in Chart

Hello,

I am trying to get the latest value every month and plot it in a chart against time.

My data looks like the below,

Date Sum(Stock)
459
1/8/201639
1/29/201639
1/1/201642
1/22/201642
1/15/201643
2/5/201643
2/19/201644
2/26/201649
2/12/201653
3/5/201665

And i am aware that Sum cannot be used as it is a snapshot of the weekly Stock. I tried using Only , but missing something to complete it. Please help. Attached the sample application here.

Thanks in advance.

4 Replies
sunny_talwar

May be this:

FirstSortedValue(Aggr(Sum(Stock), Date), -Aggr(Day, Date))

swuehl
MVP
MVP

Or if you want to get the stock on the last dates of a month per city:

=Sum(Aggr( FirstSortedValue(Stock,-Date),Country, City,Monthname))

edit: Monthname is a field created in the script

Not applicable
Author

Thanks Sunny

Not applicable
Author

Thanks Stefan.