3 Replies Latest reply: Jun 8, 2010 7:00 AM by Anatoly Pyatygo

Set Analysiss

Hi

Can someone please change this to set analysis. I have been battling for probably an hour and i can't seem to get it Right.

This is for a CY MTD Calculation on sales.

sum(IF(Year = Year(Today()),IF( MonthNumber >= 01 and MonthNumber <= Num(Month(Today())),Sales)))

Thanks,

• Set Analysiss

Hello.

try that:

sum({<Year = {\$(=Year(Today()))}, MonthNumber = {\$(=Month(Today()))}>} Sales)

but if it not work, you should to create 2 variables: vYear = year(today()) and vMonth = Month(Today())

and change expression:

sum({<Year = {\$(vYear)}, MonthNumber = {\$(vMonth)}>} Sales)

• Set Analysiss

Not one of them worked... MonthNumber Gets returned as 01,02,03 etc.

and if you look at your calculation, its not a MTD. (Its needs to be Year = Year , Month >= 01 and Month<=Month(Today()))

Please have a look at the if statement above...

Thanks,

• Set Analysiss

sorry,

sum({<Year = {\$(vYear)}, MonthNumber = {"<=\$(vMonth)"}>} Sales)