10 Replies Latest reply: Dec 1, 2017 8:48 AM by Gerald Dunn RSS

    Max/Group by not quite sufficient

    Gerald Dunn

      Qlikview 11.2

       

      I have some data of applications with Applications and Retirement Dates being shared across Servers in a big company:

       

      App   RetirementDate Server 

      A       2017                     1

      B       2018                      1

      C       2019                      1

      B       2018                      2

      D       2020                       2

       

      I want to calculate the Max date for each server, so I know which app will be resident on the server for the longest period.  This I can do with Max(RetirementDate) Group by Server.

       

      However, I also want to bring the Application(s) relating to that date into the results...so I no only know which dates but the Application(s) associated with those dates.

       

      Just can't get anything to work

       

      I have also tried Peek

       

       

      LOAD App,
      Server

      Retirement Date

      if(Peek(Retirement Date)=Retirement Date,1,0) as Flag
      From Source
      order by App,Retirement Date;

       

      And again, have tried all combinations of Order By and it just does not seem to bring the right results

       

      Any other ideas?

       

      Thanks

       

      Gerald