3 Replies Latest reply: Feb 24, 2012 1:12 AM by Iyyappan v

# Sum of Revenue for a Month

I am trying to create an expression to display the sum of the revenue in a given month. I have succeeded in doing this for a year with the following expression: =sum( {\$<Year = {\$(=Only(Year))}>} Revenue )       What do I need to do to make this by month.

• ###### Sum of Revenue for a Month

hi,

Try using it in below way.

sum( {\$<YearMonth = {\$(=max(YearMonth))}>} Revenue )

where YearMonth is a field created in script as below

Year(Date) & num(Month(Date)),'00') as YearMonth

I hope this helps.

• ###### Re: Sum of Revenue for a Month

Hi,

Try this expression

=sum( {\$<Year = {\$(=Max(Year))}, Month = {\$(=Max(Month))}>} Revenue )

Hope this helps you.

regards,

Jagan.

• ###### Re: Sum of Revenue for a Month

Hi,

Use expression like this,

= sum( {\$<Year = {\$(=Max(Year))}, MonthKey = {\$(=Max(MonthKey))}>} Revenue )

Where  MonthKey in load script =(Month(Datafield) * 1)

Regards,

Iyyappan