Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Prabhu1204
Creator
Creator

Max / GROUP BY

Hi,

i have a data with ID, Status, Priority and phase. In qlik the output should be like,

I have to take the maximum priority and corresponding phase for the status complete Is it possible to show like below expected output image

Prabhu1204_0-1655025343962.png

 

 

 

 

 

-Prabhu
Labels (1)
5 Replies
Prabhu1204
Creator
Creator
Author

@MayilVahanan 

 

Can you help

-Prabhu
MayilVahanan

Hi @Prabhu1204 ,

Try like below

Temp:
Load * Inline
[
ID Priority Status Phase
1 2 Compelte Review
1 5 Compelte Contract
1 4 Compelte Approva
1 1 Compelte sign
2 2 Compelte Review
2 5 Compelte Contract
2 7 Compelte Approva
2 8 Open Close
2 9 Open
](delimiter is ' ');

Load
ID, FirstSortedValue(Phase, -Priority) as FinalPhase Resident Temp where Status = 'Compelte'
group by ID;

MayilVahanan_0-1655039813061.png

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Prabhu1204
Creator
Creator
Author

For some reasons It is not working. I have many fields other than Id field like, date, department. etc.. is ther any approach which can be implemented in UI

-Prabhu
MayilVahanan

Might be,

try like below

FirstSortedValue(Phase, -Aggr(Max({<Status={"Compelte"}>} Priority), Priority, ID))

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Prabhu1204
Creator
Creator
Author

Hi I tried and for some reason it is not working for few id, Not sure why

-Prabhu