Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Another max row question

I have been looking through the form to solve my max row problem, I think I'm close, but still not getting it! This is what I'm trying to do

I have campus 1, and 2 (column called campus)

I have Units ICC,OR,ER .. many more (each unit may or may not be on both Campuses)

Each Unit has many rows with a update, and a archive_id for a single day.

I can get the max archive_id by using the function =aggr(max(ArchiveSnapshot_ID),campus,Unit_Name) as a Dimension.

What I'm not getting is a expression (I think) that will display the max row, per campus , unit based on the selection. If no selection is made when opening the doc I would like to see all max rows for each campus/ units. Again each campus may or may not have a the same unit.

Example

Campus,  Unit, Update, Archive_id

-----------------------------------------

campus 1, ER ,7/29/2012,12

campus 1 , ER, 7/20/2012. 23

campus 1, OR, 7/20/2012 9

campus 2, ER ,7/20/2012, 15

campus 2, ICC,7/20/2012. 34

campus 2, ICC,7/20/2012 36

Display should look something like this:(default) unless 1 or more units are selected, then only those units will be displayed

campus 1 , ER, 7/20/2012. 23

campus 1, OR, 7/20/2012 9

campus 2, ER ,7/20/2012, 15

campus 2, ICC,7/20/2012 36

4 Replies
Not applicable
Author

hi

you mean something like this?

Not applicable
Author

Yes, and no.  I still need both er's from both campuses.

Not applicable
Author

I figured it out... I was using  =aggr(max(Archive_id), Campus,Unit) and the answer is =aggr(max(Archive_id), Unit,Campus). I'm not sure why, maybe someone could expain the order thing to me..

Not applicable
Author

Well ok it solved part of the problem, but it looks like it is assigning the max row to the wrong row. I added a comment column to the qvw you posted. One can see that Campus1 and ER unit should say " Bye" and not the word "Hi" in the comments column.

See new updated file.