9 Replies Latest reply: Oct 22, 2013 2:20 AM by Hannan Tariq

# Maximum date of maximum month of maximum Year set analysis

I am just confused am i writing the correct Expression ?

I just want to show maximum date of maximum month

Date= { \$(=max({<NumMonthaname= { \$(=max({<Year = { \$(=max(Year)) } >}NumMonthaname ))} >}Date ))}

thanks

Lavi

• ###### Re: Maximum date of maximum month of maximum Year set analysis

HI,

All you need is the maximum date in your record set immaterial of any selection in year or month, if so, you can use below expression

=Max({<Year=, NumMonthName=>} Date)

Else, is you say, you need the max date for the year and month selected then expression is just

=Max(Date)

• ###### Re: Maximum date of maximum month of maximum Year set analysis

Hi,

You can try like this:

MAX({< DateField=>} Date(DateField))

• ###### Re: Maximum date of maximum month of maximum Year set analysis

Hello,

thanks for the answer but how will u write this in set expression?

MAX({< DateField=>} Date(DateField))

=Max({<Year=, NumMonthName=>} Date)

the goal is to count( Your expression of maxdate, EmployeeNo)

• ###### Re: Maximum date of maximum month of maximum Year set analysis

if this is the case, you can also try

count({<DateField={\$(=max(DateField))}>} EmployeeId)

• ###### Re: Maximum date of maximum month of maximum Year set analysis

First of all create a variable with a name vMaxDate and write following expression in the variable:

=Max(Date)

After this go to the chart where you're trying to display maxmium date for emploeeNo. Write the following equation using variable vMaxDate created :

Count({<Date={'\$(vMaxDate)'}>}EmployeeNo)

This will do the trick.

• ###### Re: Maximum date of maximum month of maximum Year set analysis

{<[ Date]= {\$(=max({<[Month]= { \$(=max({<[Year] = { \$(=max([Year])) } >}[Month] ))} >}[ Date] ))}>}

this is working for me..

• ###### Re: Maximum date of maximum month of maximum Year set analysis

Rishabh,

it didn't worked for me

=count(  {<[Date]= {\$(=max({<[Month]= { \$(=max({<[Year] = { \$(=max([Year])) } >}[Month] ))} >}[Date]))}>} EmployeeNo)

thanks

lavi

• ###### Re: Maximum date of maximum month of maximum Year set analysis

Try this

({<Date={\$(Vmaxdate)},date={\$(Vmaxmonth)}>})

Vmaxdate= max(Date)

Vmaxmonth= Max(Month(Date(Date,'DD/MM/YYYY')))

• ###### Re: Maximum date of maximum month of maximum Year set analysis

Hi,

Try like below:

=Count({<[Date] = {'\$(=Max([Date]))'}>} EmployeeNo)