Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Get All Rows of Record Based on Criteria For One or More Rows

Hi all, this is a follow-up to my earlier request (http://community.qlik.com/message/344623).  I'm looking how to apply the logic to a pivot table to get all approver status' when one or more of the approvers for a particular ID have a specific approval status.  In the attached app, I want to get all approval status' if one or more of the approvers have a status of either current or approved.  The catch is that it needs to be based on the approvers that have been selected. 

If I select "Approved" or "Current", obviously the app is only going to return records with that status (I would also want to get future records for the selections if a different selected approver is either current or has approved).  I've tried various aggr and if statements but haven't been able to come up with an expression that accomplishes what I'm looking for.

In the example, if I select just Harry and Bill, then I would want the app to only return ID=20 and not ID=5.  Additionally, ID 20 should return just Bill and Harry and their status'.  I.E. I want to display all the status' of records (based on approval name selection) where one of the approvers has either approved or is currently approving.  I appreciate your help in advance!

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Oh, I thought you wanted all approvers. Ok, try changing the expression to

MaxString({<ID=p({<Status={'Approved','Current'}>}ID)>} Status)


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Anonymous
Not applicable
Author

Does anyone have any ideas on this?

Gysbert_Wassenaar

See attached qvw. Is that what you're looking for?


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Gysbert, this is really close! Thank you so much.  The only issue with this is that it shows all approvers after filtering the records and I only want to display the selected approvers.  The filtering does exactly what I need though.  In the example, it shows Bill, Harry, Joe and Matt when I only want it to show Bill and Harry (the selections).  Is this possible?  Thank you again.

Gysbert_Wassenaar

Oh, I thought you wanted all approvers. Ok, try changing the expression to

MaxString({<ID=p({<Status={'Approved','Current'}>}ID)>} Status)


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

Perfect! Thank you, Gysbert. This is extremely helpful.  I appreciate the assistance, as always.