Loop through this customer array and use getData() method to compare the data value with a value in the float array in step 1.Get all the Customers members values and store in a text array (this will be in alphabetical order).The index of the float value will then be sorted in the order we want. Then we need to rank this array in an ascending /descending order, based on our requirement. Get all the Profitability values from query to and store it in a float array.To do that, we will be following these steps: For our Top 5 customer to show up in ranked order, we need to pass the customer values to Query 3 in an ascending or descending order of its profitability. , the getMembers() method returns the top 5 customers in alphabetical order from the master table and then passes this to the Query 3 variable. That is because when you run this script, If you have implemented the above-mentioned solution, you will notice that the top/bottom 5 customers are not sorted in the order of ascending/descending profitability. Please make sure you have read our previous blog before continuing. This approach is a great workaround to answer a very common request from users- provided that N (number of top/bottom values) is less than 20, and the ranking does not change dynamically based on users’ filter selection. In our previous blog, we outlined a way to achieve visualization for Top 5 & ‘Others’ through Query Designer and Lumira Designer (formerly known as BusinessObjects Design Studio). News – Check out our most recent news, key announcements & Press releases.Innovation Lab – The Innovation Lab is built with an aim to create market-ready BI & Analytic solutions.Careers – Explore intellectually rewarding careers in the field of Business Intelligence & Analytics.About Visual BI – We make the best in BI possible through our passion and commitment to innovation.Events – Check out events hosted and attended by Visual BI Solutions.Webinars – Get latest updates on our webinar schedules & register to learn from our experts.Videos – Handpicked video resources showcasing you the latest BI trends and technologies.Case Studies – A growing collection of more than 50+ case studies exhibiting our customers’ success.Blogs – Get your inside scoop into our take on the latest developments in BI & Analytics.Data Science & ML – Unlock endless possibilities with an optimum mix of Data Science and Machine learning.Modern BI & Analytics – Experience the power of data with modern visualization techniques.Strategy & Architecture – Drive successful outcomes with the right data strategy and architecture.Data Architecture & Engineering – Build a modern data foundation that supports your business.