Trying to Sort a Pie Chart

  • Thread starter Thread starter dohernan
  • Start date Start date
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!
 
Donno but try this --
SELECT [Form Type],Sum([QTY]) AS [SumOfQTY] FROM [StatsJanThroughJune09]
GROUP BY [Form Type]
ORDER BY Sum([QTY]), [Form Type];
 
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!
 
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!
 
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.
 
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;
 
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.
 
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. :)
 
Back
Top