Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Community,
I have a year list from 2010 until 2015, user requests to show data where the year is THISyear onward, with the condition if today is greater than 1-Apr.
For example:
If today is 31-March-2014, the year list box will show 2013, 2014 and 2015
If today is 2-April-2014, the year list box will show 2014 and 2015 only
This expression in listbox is not working:
=if(Date(Today(Date), 'ddMMM') >= Date(0401, 'ddMMM') , Year)
Anyone could help?
Thanks and best regards,
Chanel
Extra:
Original Year list box:
but what we need is
(if today (31-March) is lesser than 1-Apr)
or
Hi
This should do it. Use as a calculated dimension.
=Aggr(if(Today() >= MakeDate(Year, 4, 1) , Year))
HTH
Jonathan
Thanks Jonathan for fast response!
But seems to have little error on aggr function.
I tried with =Aggr(if(Today() >= MakeDate(Year, 4, 1) , Year), Year), but also not working.
Could you please help?
Chanel
I did make a mistake there - but your correction looks right to me, so I can't say why its not working. If you put the expression into a list box, you can see what values it is producing.
Try using Today(1) as well.
Jonathan
Hi,
Try Jonathan Expression without aggr()
Like
=if(Today() >= MakeDate(Year, 4, 1) , Year)
Regards
PS
Hi PS,
=if(Today() >= MakeDate(Year, 4, 1) , Year) will give me result below:
but what i need is
(if today (31-March) is lesser than 1-Apr)
or
(if today (2-Apr) is greater than 1-Apr)
Thanks,
Chanel
Hi,
this statement work properly at my side,
if(Today() < MakeDate(Year, 4, 1) , Year)
Please find attachment
Regards,
PS