Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sushil353
Master II
Master II

how to find data relavent to the last day of the given date??

Hi All,

I have a date field in which dates are given. My problem is.

1. When user selects the month. It should give the data relavent to the max(date) of the selected month.

2. also i want to calculate the data difference of the current and previous month last day.

for example i have attached the sample data.

for problem 1: if user selects the NOV month i should get the data for (11-11-2012) as this is the last date present in the date field for nov month.

                     it should be: 49208.

for problem 2: i should get the difference of "current month last day data value - last month last day data value".

                     for the sample data it should come out to be 49208-49038 = 170

I have attached the sample data and application. Please help me out to solve this problem

Thanks in advance

SKR

2 Replies
Not applicable

Hi,

Please find the attachment.

Niranjan M.

nirav_bhimani
Partner - Specialist
Partner - Specialist

Hi ,

Try this

For  Current month

=sum({<CalendarYear={$(=max(CalendarYear))},CalendarMonthName={$(=Month(Max(OrdDate)))}>} InTotRs)

For LastMonth

=sum({<CalendarYear={$(=max(CalendarYear))},CalendarMonthName={$(=month(addmonths((max(OrdDate)),-1)))}>}InTotRs)

Variance of Month

sum({<CalendarYear={$(=max(CalendarYear))},CalendarMonthName={$(=Month(Max(OrdDate)))}>} InTotRs)

-

sum({<CalendarYear={$(=max(CalendarYear))},CalendarMonthName={$(=month(addmonths((max(OrdDate)),-1)))}>}InTotRs)

Regards,

Nirav Bhimani