Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

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)

9 Replies
Not applicable

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)

Not applicable

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

Hi,

You can try like this:

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


Not applicable

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)

Not applicable

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..

Not applicable

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)

Not applicable

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')))

Not applicable

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

Not applicable

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

Hi,

Try like below:

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

Not applicable

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.

Community Browser