Access graphs

  • Thread starter Thread starter mnoll
  • Start date Start date
The rowsource appears to have the correct date format included:

SELECT (Format([Date],"MMM 'YY")) AS Expr1, Sum([Data by Cost Center test
Activity graphs].[Actual Mo]) AS [SumOfActual Mo], Sum([Data by Cost Center
test Activity graphs].[Budget Mo]) AS [SumOfBudget Mo], [Data by Cost Center
test Activity graphs].Key FROM [Data by Cost Center test Activity graphs]
GROUP BY (Format([Date],"MMM 'YY")), [Data by Cost Center test Activity
graphs].Key, (Year([Date])*12+Month([Date])-1) HAVING ((([Data by Cost Center
test Activity graphs].Key) Like "OPVOL")) ORDER BY (Format([Date],"MMM 'YY"));
 
You are ordering by the month name and then year. This will display Apr befor
Jan.

Try:
SELECT (Format([Date],"MMM 'YY")) AS Expr1, Sum([Actual Mo]) AS [SumOfActual
Mo], Sum([Budget Mo]) AS [SumOfBudget Mo], [Key]
FROM [Data by Cost Center test Activity graphs]
WHERE [Key] = "OPVOL"
GROUP BY (Format([Date],"MMM 'YY")), [Key], (Year([Date])*12+Month([Date])-1)
ORDER BY Year([Date])*12+Month([Date])-1;
--
Duane Hookom
Microsoft Access MVP


mnoll said:
The rowsource appears to have the correct date format included:

SELECT (Format([Date],"MMM 'YY")) AS Expr1, Sum([Data by Cost Center test
Activity graphs].[Actual Mo]) AS [SumOfActual Mo], Sum([Data by Cost Center
test Activity graphs].[Budget Mo]) AS [SumOfBudget Mo], [Data by Cost Center
test Activity graphs].Key FROM [Data by Cost Center test Activity graphs]
GROUP BY (Format([Date],"MMM 'YY")), [Data by Cost Center test Activity
graphs].Key, (Year([Date])*12+Month([Date])-1) HAVING ((([Data by Cost Center
test Activity graphs].Key) Like "OPVOL")) ORDER BY (Format([Date],"MMM 'YY"));
--
mn


mnoll said:
Report graph axis (date) is plotting alpha rather than chronologically
 
I changed only the "order by" info and the problem is solved. Odd thing
though, this problem only was seen in versions of this report that had a
"where" clause in the graph row select statement. Any idea why?

Thank you greatly for the assistance.
--
mn


Duane Hookom said:
You are ordering by the month name and then year. This will display Apr befor
Jan.

Try:
SELECT (Format([Date],"MMM 'YY")) AS Expr1, Sum([Actual Mo]) AS [SumOfActual
Mo], Sum([Budget Mo]) AS [SumOfBudget Mo], [Key]
FROM [Data by Cost Center test Activity graphs]
WHERE [Key] = "OPVOL"
GROUP BY (Format([Date],"MMM 'YY")), [Key], (Year([Date])*12+Month([Date])-1)
ORDER BY Year([Date])*12+Month([Date])-1;
--
Duane Hookom
Microsoft Access MVP


mnoll said:
The rowsource appears to have the correct date format included:

SELECT (Format([Date],"MMM 'YY")) AS Expr1, Sum([Data by Cost Center test
Activity graphs].[Actual Mo]) AS [SumOfActual Mo], Sum([Data by Cost Center
test Activity graphs].[Budget Mo]) AS [SumOfBudget Mo], [Data by Cost Center
test Activity graphs].Key FROM [Data by Cost Center test Activity graphs]
GROUP BY (Format([Date],"MMM 'YY")), [Data by Cost Center test Activity
graphs].Key, (Year([Date])*12+Month([Date])-1) HAVING ((([Data by Cost Center
test Activity graphs].Key) Like "OPVOL")) ORDER BY (Format([Date],"MMM 'YY"));
--
mn


mnoll said:
Report graph axis (date) is plotting alpha rather than chronologically
 
I have found that adding a where clause can change the order in a report from
the query's somewhat natural order to some random order.

--
Duane Hookom
Microsoft Access MVP


mnoll said:
I changed only the "order by" info and the problem is solved. Odd thing
though, this problem only was seen in versions of this report that had a
"where" clause in the graph row select statement. Any idea why?

Thank you greatly for the assistance.
--
mn


Duane Hookom said:
You are ordering by the month name and then year. This will display Apr befor
Jan.

Try:
SELECT (Format([Date],"MMM 'YY")) AS Expr1, Sum([Actual Mo]) AS [SumOfActual
Mo], Sum([Budget Mo]) AS [SumOfBudget Mo], [Key]
FROM [Data by Cost Center test Activity graphs]
WHERE [Key] = "OPVOL"
GROUP BY (Format([Date],"MMM 'YY")), [Key], (Year([Date])*12+Month([Date])-1)
ORDER BY Year([Date])*12+Month([Date])-1;
--
Duane Hookom
Microsoft Access MVP


mnoll said:
The rowsource appears to have the correct date format included:

SELECT (Format([Date],"MMM 'YY")) AS Expr1, Sum([Data by Cost Center test
Activity graphs].[Actual Mo]) AS [SumOfActual Mo], Sum([Data by Cost Center
test Activity graphs].[Budget Mo]) AS [SumOfBudget Mo], [Data by Cost Center
test Activity graphs].Key FROM [Data by Cost Center test Activity graphs]
GROUP BY (Format([Date],"MMM 'YY")), [Data by Cost Center test Activity
graphs].Key, (Year([Date])*12+Month([Date])-1) HAVING ((([Data by Cost Center
test Activity graphs].Key) Like "OPVOL")) ORDER BY (Format([Date],"MMM 'YY"));
--
mn


:

Report graph axis (date) is plotting alpha rather than chronologically
 
Back
Top