Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Getting LAST value in the selected Date Range QLIK SENSE

Hello guys!

I need some help here! Data example:

Store / Date / Stock($)

1 / 2017-01-01 / 1

2 / 2017-01-01 / 2

1 / 2017-01-02 / 3

2 / 2017-01-02 / 4

1 / 2017-01-03 / 5

2 / 2017-01-03 / 6


User selected date range from 2017-01-01 to 2017-01-02

I want to show only the last selected day sum(stock)


Stock($) = 7


I've tryed SUM( {< DATE = {'2017-01-02'} >} STOCK) and this worked, but how to do using "max_date_range variable"?

Thanks!

1 Solution

Accepted Solutions
OmarBenSalem


Maybe:


SUM( {< DATE = {"$(=max(DATE))"} >} STOCK)

View solution in original post

11 Replies
oknotsen
Master III
Master III

If you have a Qlik SENSE question, please don't post it in a QlikVIEW forum.

Topic moved.

May you live in interesting times!
MA1
Contributor III
Contributor III

Hi,Victor

sum({<date={"$(=Date(Max(date),'YYYY-MM-DD'))"}>} stock)

Maybe It helps you

OmarBenSalem


Maybe:


SUM( {< DATE = {"$(=max(DATE))"} >} STOCK)

sunny_talwar

What is your variable called? May be like this

Sum({<Date = {"$(=Date(MaxDateVariable, 'YYYY-MM-DD'))"}>}stock)

ahaahaaha
Partner - Master
Partner - Master

Hi Victor,

May be like in attached file

Not applicable
Author

sorry about that, I'm qlikview user and posted wrong automatically

Not applicable
Author

Thanks!

Not applicable
Author

Thanks! I was using ' instead of "

Not applicable
Author

Thanks!