Bars in Bar Charts in an order

L

Lin

Hello,

I have Bar Chart in access database.

Rowsource for this chart is
TRANSFORM Sum(Chart_FD.CountOfUCCID) AS SumOfCountOfUCCID
SELECT Year
FROM Chart_FD
GROUP BY Year
PIVOT EQTMAN;
It works fine. But I would like to arrange the bars in an order of SumOf
CountOf UCCID descending. Trnasform Statement did not let me to Order by an
aggregate function. Is there any other way I can do this.

Thank you for your help.
 
D

Duane Hookom

I don't think there is any easy method for doing this. Since the
[SumOfCountOfUCCID] is grouped by Year, which Year's results would you use
for sorting?
 
L

Lin

It depends on which year the users selecting. They have the option to select
the year for last 5 years.

Thank you

Duane Hookom said:
I don't think there is any easy method for doing this. Since the
[SumOfCountOfUCCID] is grouped by Year, which Year's results would you use
for sorting?
--
Duane Hookom
Microsoft Access MVP


Lin said:
Hello,

I have Bar Chart in access database.

Rowsource for this chart is
TRANSFORM Sum(Chart_FD.CountOfUCCID) AS SumOfCountOfUCCID
SELECT Year
FROM Chart_FD
GROUP BY Year
PIVOT EQTMAN;
It works fine. But I would like to arrange the bars in an order of SumOf
CountOf UCCID descending. Trnasform Statement did not let me to Order by an
aggregate function. Is there any other way I can do this.

Thank you for your help.
 
D

Duane Hookom

If they only select a single year then you might try change your Row Source to

SELECT Sum(Chart_FD.CountOfUCCID) AS UCCIDCount
FROM Chart_FD
ORDER BY Sum(Chart_FD.CountOfUCCID) DESC;

--
Duane Hookom
Microsoft Access MVP


Lin said:
It depends on which year the users selecting. They have the option to select
the year for last 5 years.

Thank you

Duane Hookom said:
I don't think there is any easy method for doing this. Since the
[SumOfCountOfUCCID] is grouped by Year, which Year's results would you use
for sorting?
--
Duane Hookom
Microsoft Access MVP


Lin said:
Hello,

I have Bar Chart in access database.

Rowsource for this chart is
TRANSFORM Sum(Chart_FD.CountOfUCCID) AS SumOfCountOfUCCID
SELECT Year
FROM Chart_FD
GROUP BY Year
PIVOT EQTMAN;
It works fine. But I would like to arrange the bars in an order of SumOf
CountOf UCCID descending. Trnasform Statement did not let me to Order by an
aggregate function. Is there any other way I can do this.

Thank you for your help.
 

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