Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
How can I make a button to select the date range of the previous year. Everything I've tried so far fails.
=Year(max([fecha]))-1
=(max({<[fecha.autoCalendar.Year]={"$(=Year(max([fecha])))"}>}[fecha]))-1
Thank you!
see with the following expression, put your date field
Concat({<[fecha]= {">=$(=Date(YearStart(max([fecha]),-1),'DD/MM/YYYY'))<=$(=Date(Yearend(max([fecha]),- 1),'DD/MM/YYYY'))"}>} DISTINCT date([fecha]), ';' )
Regarts,
Matheus
Hi, @Magogar
try to adjust like:
max([fecha])-1
or
year(today())-1
Regarts,
Matheus
Thanks, but it doesn't work. The dates are in DD/MM/YYYY format, and I want to get the date range of the previous entire year. For the buttons I don't know how to write it.
=Year(max([fecha]))-1
=max(year([fecha.autoCalendar.Year]))-1
=max(year([fecha.autoCalendar.Year])-1)
=max([fecha.autoCalendar.Year])-1
see with the following expression, put your date field
Concat({<[fecha]= {">=$(=Date(YearStart(max([fecha]),-1),'DD/MM/YYYY'))<=$(=Date(Yearend(max([fecha]),- 1),'DD/MM/YYYY'))"}>} DISTINCT date([fecha]), ';' )
Regarts,
Matheus
Awesome! it works perfectly. Thanks a lot.