Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

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

1 Solution

Accepted Solutions
Not applicable
Author

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)

View solution in original post

9 Replies
Not applicable
Author

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)

Not applicable
Author

Hi,

You can try like this:

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


Not applicable
Author

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)

Not applicable
Author

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

this is working for me..

Not applicable
Author

if this is the case, you can also try

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

Not applicable
Author

Try this

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

Vmaxdate= max(Date)

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

Not applicable
Author

Rishabh,

           it didn't worked for me

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

thanks

lavi

Not applicable
Author

Hi,

Try like below:

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

Not applicable
Author

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.