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.
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,
Original Year list box:
but what we need is
This should do it. Use as a calculated dimension.
=Aggr(if(Today() >= MakeDate(Year, 4, 1) , Year))
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?
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.
Try Jonathan Expression without aggr()
=if(Today() >= MakeDate(Year, 4, 1) , Year)
=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)
(if today (2-Apr) is greater than 1-Apr)
this statement work properly at my side,
if(Today() < MakeDate(Year, 4, 1) , Year)
Please find attachment