Qlik Community

Ask a Question

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik Highlights 2020 Giveaway! Watch, reply and have a chance to win a $200 Amazon Gift Card! Watch Video
cancel
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

How to get data by default date but not max date

Hello, Friends!

My problem is to get the default date for data selection, but not the max date.

Usually, we can use Max("Date_Filed") to get the max date for today, also current year or month.

But I have a table which has some data in future. That means max date is not today. And I cannot get current year and month via this method.

for example

Date (YYYY-MM-DD)Amount
2018-01-01100
2018-05-01100
2018-06-07100
2018-09-01100

If I use Max("Date (YYYY-MM-DD)"), Then I get date 2018-09-01 which is in future.

What I want is to show data on today (2018-06-07) or to sum from 2018-01-01 to 2018-06-07 and so on.

And with another important point that if I change the date, the data shown is also changed.

If anyone met the situation before?

Thank you very much.

1 Solution

Accepted Solutions
Contributor III
Contributor III

Get it done by If() + GetSelectedCount()

View solution in original post

5 Replies
Contributor III
Contributor III

Get it done by If() + GetSelectedCount()

View solution in original post

Partner
Partner

if(GetSelectedCount(date)>0,max(date),today())?

Contributor III
Contributor III

if(GetSelectedCount(date)<0,today(),max(date))

Partner
Partner

you can never select less than 0?

Contributor III
Contributor III

oh, yes, you are right.

sorry for that.

it is less than 1