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)
"Top N" plus "the rest"?
jrep
How can I draw a pie chart containing the "Top N" values, plus a summary entry for "all the rest"?
I have a lot of reports where the basic data is a long list of value/count pairs, like
1234 Val1
984 Val2
854 Val3
731 Val4
and so on. Generally, there are more of these that can be legibly charted, so I generally use a 'Top N' filter for the chart data. But this isn't entirely satisfactory: the remaining entries might add up to a significant proportion of the total, even though they individually are small.
So, is there some way to chart the "Top N" values, plus one more wedge for "all the rest"?
I'm happy to do this in SQL, Data Set, or Chart configuration, but I can't depend on manually diddling the data for each report generation (I run these reports automatically, every week).
Find more posts tagged with
Comments
SailRCG
Hi Jack,
This can be done using a combination of the "minimum %" pie slice property and filtering your data set. Once configured you should't need to do any "manual diddling of the data"...
Hans_vd
You could also do it in the SQL:
SELECT CASE WHEN t.count >= 100 THEN t.value
ELSE 'rest'
END,
SUM (t.count)
FROM your_table t
GROUP BY CASE
WHEN t.count >= 100 THEN t.value
ELSE 'rest'
END
Hans_vd
Were you able to solve your problem?
How did you do it?