Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

to display branch,Result corresponding to max(sort) in each branch

Hi I have script as follows:

t1:

LOAD * INLINE [

    Branch Name, Result, Month, Year ,sort

    BRADLEE, Pass, Jun-2015, 2015, 3

    BUCKINGHAM, Pass, May-2015, 2015, 2

    BUCKINGHAM, Fail, Jun-2015, 2015, 3

    DUKE STREET, Fail, Apr-2015, 2015, 1

    DUKE STREET, Pass, Jul-2015, 2015,4

    LANDMARK, Pass, May-2015, 2015, 2

    RIVERSIDE PARK, Fail, Apr-2015, 2015, 1

    RIVERSIDE PARK, Pass, Jun-2015, 2015, 3

    SEVEN CORNERS, Pass, Jul-2015, 2015, 4

    SOUTH ARLINGTON, Pass, Jun-2015, 2015, 3

    SOUTH ARLINGTON, Fail, Jul-2015, 2015, 4

];

i need to display branch,Result corresponding to max(sort) in each branch.

help pls...

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

In a table with Branch as a dimension:

     =FirstSortedValue(Result, -sort)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

In a table with Branch as a dimension:

     =FirstSortedValue(Result, -sort)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
MK_QSL
MVP
MVP

=FirstSortedValue(Result, -sort)