Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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-01 | 100 |
2018-05-01 | 100 |
2018-06-07 | 100 |
2018-09-01 | 100 |
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.
Get it done by If() + GetSelectedCount()
Get it done by If() + GetSelectedCount()
if(GetSelectedCount(date)>0,max(date),today())?
if(GetSelectedCount(date)<0,today(),max(date))
you can never select less than 0?
oh, yes, you are right.
sorry for that.
it is less than 1