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: 
vimalmanavalan
Contributor II
Contributor II

Getting top1 row from each category from table

hello Qliksense users,

I'm new to Qliksense and got stuck on getting one logic to convert below data to filter top1 rows of each category.

Expected output should have only one row/name related information.

can anyone put some light on my query .?? how to acheive it.?

 

INPUT DATA TABLE
NAMECATEGORYPRIORITY
SHOP1APPLE1
SHOP4TOMATO4
SHOP3PINEAPPLE3
SHOP1GRAPES2
SHOP2APPLE1
SHOP5TOMATO4
SHOP2PINEAPPLE3
SHOP2GRAPES2
SHOP3GRAPES2
SHOP5ROSE5
SHOP4ROSE5

 

 

EXPECT OUTPUT
NAMECATEGORYPRIORITY
SHOP1APPLE1
SHOP2APPLE1
SHOP3GRAPES2
SHOP4TOMATO4
SHOP5ROSE5
1 Solution

Accepted Solutions
MayilVahanan

HI @vimalmanavalan 

Try like below

MayilVahanan_0-1618219708284.png

 

Exp: FirstSortedValue(CATEGORY, PRIORITY)

For Priority, you can use Min(PRIORITY) also

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

View solution in original post

2 Replies
MayilVahanan

HI @vimalmanavalan 

Try like below

MayilVahanan_0-1618219708284.png

 

Exp: FirstSortedValue(CATEGORY, PRIORITY)

For Priority, you can use Min(PRIORITY) also

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

Excellent, Thanks for the suggestion 🙂