Well I'm back again.
I know I've had this before, but no memory of how or where I have the solution.
In a nutshell; I have a query that has a sort by month-year. The chart however sorts this alphabetically
Ideas please?
Chart sort
-
- Administrator
- Posts: 78676
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- 5StarLounger
- Posts: 736
- Joined: 18 Mar 2010, 11:05
Re: Chart sort
The query is in date format (though I tried mm-yyyy too) & sorts appropriately, but the chart still re-sorting to alphabetical.
-
- Administrator
- Posts: 78676
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Chart sort
Try replacing the date field with a calculated column
Format([DateField],"yyyy-mm")
where DateField is the name of the date field.
Explanation: The Chart Wizard in Access tends to create a crosstab query from the query you provide. The column field of a pivot table is treated as text, even if it is a date field.
Format([DateField],"yyyy-mm")
where DateField is the name of the date field.
Explanation: The Chart Wizard in Access tends to create a crosstab query from the query you provide. The column field of a pivot table is treated as text, even if it is a date field.
Best wishes,
Hans
Hans
-
- 5StarLounger
- Posts: 736
- Joined: 18 Mar 2010, 11:05
Re: Chart sort
Didn't quite get that, but it got me looking in the row source for the chart. That was quite an education!
What I tried (that worked ) was replacing the SQL with that of the query. Now it works.
Cheers hans
What I tried (that worked ) was replacing the SQL with that of the query. Now it works.
Cheers hans
-
- Administrator
- Posts: 78676
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands