4 Replies Latest reply: Mar 14, 2013 4:45 AM by Nirmal Raj

# Set expression for max(Date id) for all the months and years

Hi,

I have a data for the year 2012-2013 which have the Fiscal Year,Fiscal Month,Date,DateId,and the Value for that.Here the Date id is there for each and every date.while returning the sum of values i want the values only for a max(dateid) for that particular month(only one value for a month to be picked up.I have declared variables and i have written below set expression but it is returning only that particular month based on selection

=sum({\$<FiscalYear={\$(=Variable1)},MonthName={\$(=Variable2)},DateID={\$(=max(DateID))}>} Value

Can you please guide me how can i write a set expression for this.

Thanks & Regards,

Hari

• ###### Re: Set expression for max(Date id) for all the months and years

what does Variable1 and variable2 specifies? Could please explain your requirement in clear?

• ###### Re: Set expression for max(Date id) for all the months and years

Hi Manideep,

forget abt the above expression.

My requirements are :

1.Dateid's are there for each and every  Fiscal date.So i want to pick up the max(dateid) of that particular month for that entire years.

2.I want to display the sum of values of only maximum Date id of that particular month(in straight table).

Thanks,

Hari

• ###### Re: Set expression for max(Date id) for all the months and years

Try this,

Sum( {\$<DateID={"\$(=Max(DateID))"},Month=,FiscalYear=>}Value)

Hope it could resolve your problem. If you are still getting a problem please let me know and provide some sample data.

• ###### Re: Set expression for max(Date id) for all the months and years

Hi,