Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Issue in expression with set analysis

Dear All

I have created 2 variables as below:

vStart =date(MonthStart( AddMonths(Max(TDATE),-6)))

vEnd   =date(MonthEnd( AddMonths(Max(TDATE),-1)))  

I am trying to use these variables to calculate last 6 months data in below expression. However it does not calculate.

It gives the result of the month selected.

=sum(  {<TDATE={">=$(=vStart )< $(=vEnd)"}>}Sales)

Do I need to change any format of date or do any modifications in above expression or variable definition?

Thanks & Regards

Chintan

12 Replies
Anonymous
Not applicable
Author

Hello Sunny

PFA Sample for few thousand records debug.

Thanks

Chintan

sunny_talwar

I think TURNOVER value is missing before Apr-2015, but if I select Apr-2015 it gives something like this

Capture.PNG

=Sum({<MonthYear={"$(='>=' & Date(MonthStart(Max({<TURNOVER = {'*'}>}MonthYear), -6), 'MMM-YYYY') & '<' & Date(Max({<TURNOVER = {'*'}>}MonthYear), 'MMM-YYYY'))"}, Month, Year, Monyr, TDATE, DATE>}TURNOVER)

Anonymous
Not applicable
Author

It works!!

Thanks & Regards

Chintan