Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Chart some, percent of all
jrep
I'm trying to build a pie chart of some data where there are really too many rows for a readable pie chart. I'd like to chart just, say, the top 10 values, but show their value-series percent of the whole data set.
I can figure out how to annotate the chart with value-as-percent-of-all-rows-charted, but not how to make the percent cover the rows not charted.
Alternatively, if there were a way to combine rows 11 and beyond into a single "other" category, that would be good, too.
Some sample data, in case my description's unclear:
+
+
+
| Sent | user |
+
+
+
| 77214929191 | user1 |
| 14846739174 | user2 |
| 7422488943 | user3 |
| 3444377412 | user4 |
| 2151009953 | user5 |
| 1358030383 | user6 |
| 1357835195 | user7 |
| 1296069791 | user8 |
| 1222027517 | user9 |
| 1211285392 | user10 |
...
All together, there are around 100 rows to this table.
I'm using the BIRT Report Designer (2.5.2) in Eclipse.
Find more posts tagged with
Comments
JRS
Hi,
did you try to create computed columns in your data set? I think you should do two computed columns.
The first one should be a sum over the 'sent' row. Just add a computed column and name it Sent_SUM, choose 'sum' from the aggregation field and for expression 'row["Sent"]'.
Then add another computed column named Sent_percent where you put into the expression field:
row["Sent"]/row["Sent_SUM"]
So now you have everything you want for your chart or whatever.
To only show the top-n values you have to add an filter to the element (chart, diagram, whatever) where you choose:
dataSetRow["Sent_percent"] is top n
You can choose n just as you want.
I hope this is want you wanted to do.
Regards,
JRS