Trying to Sort a Pie Chart

D

dohernan

The Legend and Chart keep Sorting Alphabetically.
I want them to sort based on percentages, highest first, the greatest amount
of Form types on top.

The Row line of the chart is-

SELECT [Form Type],Sum([QTY]) AS [SumOfQTY] FROM [StatsJanThroughJune09]
GROUP BY [Form Type];

Thanks!
 
K

KARL DEWEY

Donno but try this --
SELECT [Form Type],Sum([QTY]) AS [SumOfQTY] FROM [StatsJanThroughJune09]
GROUP BY [Form Type]
ORDER BY Sum([QTY]), [Form Type];
 
D

dohernan

I tried in the Report and the chart didn't work. :/


KARL DEWEY said:
Donno but try this --
SELECT [Form Type],Sum([QTY]) AS [SumOfQTY] FROM [StatsJanThroughJune09]
GROUP BY [Form Type]
ORDER BY Sum([QTY]), [Form Type];

--
Build a little, test a little.


dohernan said:
The Legend and Chart keep Sorting Alphabetically.
I want them to sort based on percentages, highest first, the greatest amount
of Form types on top.

The Row line of the chart is-

SELECT [Form Type],Sum([QTY]) AS [SumOfQTY] FROM [StatsJanThroughJune09]
GROUP BY [Form Type];

Thanks!
 
K

KARL DEWEY

Did you place this query in the report source and it not work?
Or did you enter [SumOfQTY] and [Form Type] in the Grouping and Sorting
part of the report?

--
Build a little, test a little.


dohernan said:
I tried in the Report and the chart didn't work. :/


KARL DEWEY said:
Donno but try this --
SELECT [Form Type],Sum([QTY]) AS [SumOfQTY] FROM [StatsJanThroughJune09]
GROUP BY [Form Type]
ORDER BY Sum([QTY]), [Form Type];

--
Build a little, test a little.


dohernan said:
The Legend and Chart keep Sorting Alphabetically.
I want them to sort based on percentages, highest first, the greatest amount
of Form types on top.

The Row line of the chart is-

SELECT [Form Type],Sum([QTY]) AS [SumOfQTY] FROM [StatsJanThroughJune09]
GROUP BY [Form Type];

Thanks!
 
D

dohernan

I looked at the Pie Chart Properties, went to the Row line and added ORDER BY
Sum([QTY]), [Form Type];
after the Group By line.
 
D

dohernan

The Query I'm basing the Report w the Pie Chart on has the following SQL-

SELECT Verif1Form.[Form Type], Count(Verif1Form.[Form Type]) AS QTY
FROM Verif1Form
WHERE ((([Completed]) Between CVDate(#1/1/2009#) And CVDate(#6/30/2009#)))
GROUP BY Verif1Form.[Form Type]
ORDER BY Count(Verif1Form.[Form Type]) DESC;
 
D

Duane Hookom

In my experience the ORDER BY of the chart's Row Source determines the order
of the slices from the top clockwise and also the legend. The order in the
Record Source of the report would establish the order of the report records.
 
D

dohernan

Thanks, I found that the issue was I had a semi-colon before the Order by
command.

The Pie and legend now sort by the lowest percentage to the highest.
I want it highest to lowest, so am trying to figure out where/how to put the
Descending command. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top