Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
can anybody help please
I have used and following expression to sum the values for current month which works fine:
SUM({$<[Date]={'>=$(=MonthStart(Today()))<=$(=MonthEnd(Today()))'}>}[Sales Actual])
I need to find separately values for previous month trying below expression, but it doesn't work:
SUM({$<[Date]={'>=$(=MonthStart(Today()),-1))<=$(=MonthEnd(Today()),-1))'}>}[Sales Actual])
Any suggestion please
rgds
Jacek
Hi
Suppress the comma before -1 lire this :
SUM({$<[Date]={'>=$(=MonthStart(Today())-1))<=$(=MonthEnd(Today())-1))'}>}[Sales Actual])
extra ) in there after today(), the ,-1 is part of the monthstart arguments
SUM({$<[Date]={'>=$(=MonthStart(Today(),-1))<=$(=MonthEnd(Today(),-1))'}>}[Sales Actual])
Use Master Calendar and it's Flags to save the pain for using complex Set analysis in front end.
Flags are fairly easy to use.
Your expression will look
Sum({< LastMonthFlag = {1}>}[Sales Actual])
Try:
SUM({$<[Date]={'>=$(=MonthStart(Today(),-1))<=$(=MonthEnd(Today(),-1))'}>}[Sales Actual])
You can also try
SUM({$<[Date]={'>=$(=addmonths(MonthStart(Today()),-1))<=$(=addmonths(MonthEnd(Today()),-1))'}>}[Sales Actual])