Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Condensed pie chart

Status
Not open for further replies.

HORH

Technical User
Feb 17, 2005
1
DE
I used to make a pie chart in an Access 2003 Report, categorized and sum'ed from record fields in a table

The number of categories has now known so that the number of pie 'slices' and 'legend texts' becomes unreadable.

Is there any way to condense the smallest pie slices - e.g. where field sum < 1000 - into a sigle 'Other - slice'? Without any/too much programming, please.

Rgds.
HORH
 
use two queries - with the first define the data you want to display as 'other'
Code:
subquery1:

select [field in legend now], iif(sum([field you are counting]) < 1000, "Other", [field in legend now]) as NewType
from yourtable
where...
group by [field in legend now];
Then select your data and graph the 'NewType' field
Code:
select subquery1.NewType, sum([field you are counting])
from yourtable INNER JOIN subquery1 ON yourtable.[field in legend now] = subquery1.[field in legend now]
where ...
group by subquery1.NewType
order by ...
Adjust as needed.
Hope that makes sense - I've use many similar queries to consolidate 'Other' data in graphs.

traingamer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top