Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I want to create a variable where the max date should not be greater than today. Currently I have a max date as 31 Dec 2017.
Formula for Max Date:
=Date(max(Date),'YYYY/MM/DD')
Here is my variable.
=if(num(max(Date))>num(Today()), Null(),Date)
I can't seem to get it right.
Thank you
Kind regards
Nayan
=if(floor(max(Date))>floor(today()), floor(today()),max(Date))
or
=if(floor(max(Date))>floor(today()), null(),max(Date))
Let's assume, your variable looks like below, You may don't have issue with Date formats
LET Var = Date(Max(Date),'YYYY/MM/DD')
And then condition should be like this
If($(Var) > Date(Today(), 'YYYY/MM/DD'), Null(), Date)
If you are expecting the variable to return the max date, try like:
=if(max(Date)>Today(), Null(),Date(Max(Date)))
Or, simpler
=if(max(Date)<=Today(),Date(Max(Date)))
=if(floor(max(Date))>floor(today()), floor(today()),max(Date))
or
=if(floor(max(Date))>floor(today()), null(),max(Date))
Hi Anil
Thank you for your response. Will try it out and let you know.
Kind regards
Nayan
Hi Anil
I've tried your formula, however i still get a blank.
kind regards
Nayan
have you tried my solution?
You can use the RangeMin function, this will return the minimum value, for example
=RangeMin(max(Date), Today())
You mean to say, Are you trying this expression in Variable?
Hi,
try
=Max({<DateField={'<=$(=Date(Today()))'}>} DateField)
Regards,
Antonio