Logi Info Forum Threads    >    Posts

Can you return Top n rows using a Group Filter

Kurtis Linke
United States

27 Apr 2020 10:22 AM
This thread has been resolved and is closed.
12.7.106-SP2   Java app   124 views   

I have a group filter that I would like to return the Top 10 rows.  Is there a way to apply a Top n rows filter?

Blake Ryner
United States

28 Apr 2020 12:53 PM

Ideally, you can do it all via your SQL Data Layer using a TOP/LIMIT clause.  If not, you can do it in Logi with a few extra elements.  After your group by add a Rank Column (a child of the data layer not the group by) and then a Compare Filter after the Rank Column.  You might want to set your rank to order in reverse to get the biggest number.  On your Compare Filter just set up your values and you should be good to go.

Kurtis Linke
United States

29 Apr 2020 09:15 AM

thank you that worked, I needed to allow for Logi to group the data rather than using Top clause in SQL since I am adding Analysis filters to allow for user to filter on non-aggreagated fields to show Top 10 for the applied filters


United States
7900 Westpark Drive
Suite A200
Virginia, 22102

United Kingdom
Scott House
The Concourse
Waterloo Station
London, SE1 7LY
020 3103 0306

20 Harcourt Street
Suite 10
D02 H364
3531 400 7506

© Copyright 2020 Logi Analytics, Inc. All Rights Reserved           |          Contact DevNet          |          Site FAQs          |          Terms of Use          |          LogiAnalytics.com