Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Sort a column and get the top N of the column
evgeny
Hello and thank you for reading this post,
I am new to Birt and have just started building a report.
My goal is to display topN customers in descending order. And my table is looking like this:
Customer A
Customer B
Customer A
Customer A
Customer C
Customer C
Customer A
What I succeeded so far is to create a report which shows me the amount of the orders of the customers, it looks like this:
Customer A - 4
Customer B - 1
Customer C - 2
I have done that by having a Count function in the Summary Field of the Data Cube and a Sum function in the field on the Cross Tab.
And here my problem:
I would like to sort this table in descending order. And then get the top N customers (customers with the most orders). I have seen in some tutorials that there is normally a "Sorting" Tab in the Property Editor, but I there is no such tab in my eclipse (though I just downloaded the last 2.5 version of Birt).
Any help is greatly appreciated.
Evgeny
Find more posts tagged with
Comments
mwilliams
Hi Evgeny,
Take a look at the attached report design. It should be what you're looking for, I think. I used a crosstab and made a chart that used the crosstab for its data. Be sure to change the file location for the dataSource to the directory in which you save the .txt file. Let me know if you have questions.
evgeny
Thank you for your help!
mwilliams
No problem. Let us know whenever you have questions.
evgeny
ok, thanks. yeah i had an older version of bird. thanks for the example, now i know that you can use a crosstab as a data source for a graph (finally i can do a pie chart with my data
Evgeny
mwilliams
You're welcome. Good luck!