Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
How to write the expression for the year to last month end
for example now the current month is June if i click on year then i want from 01/01/2017 to may end.
How to writhe expression for that?
hi
assuming you have a date field called DATE
it should be something like
sum({<DATE={'<=$(=date(floor(monthend(addmonths(today(),-1))))'}>}SALES)
You can do with YearStart() and YearEnd() functions
Please check
=sum({$<[Date] = {"<=$(MonthEnd(AddMonths([Date],-1)))"} >}[Sales])
{<Date={'>=$(=StartYear(Today()))'}>}
Assuming Your format date is DD/MM/YYYY or MM/DD/YYYY
Count(
{<DateField={'>YearStart(today(2)) <Monthend(today(2),-1)'}>}
YourFlag)