Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Chart Wont Follow Order by in Query
Stanley Mc Keown 
     
11 months ago
I have a query that sums up items by quarter which starts in April so in the query I had to put in a calculated year-month field to get the order of the quarters correct ie the first quarter of the year is 4 so the order of quarters in a year is 4,1,2,3.

My year-month field ascending gives the correct order on the query but the chart based on that query puts the quarter 1 first and ignores my order by.

  Can I get a function to give year-quarter calculated field and would that give the chart I need?
Richard Rost  @Reply  
          
11 months ago
I'm a little confused. What does the data look like in your query? Can you show a screenshot and a screenshot of the chart?
Richard Rost  @Reply  
          
11 months ago
I've got another item on my TechHelp list that someone sent in a while ago. It's basically the same thing they want to sort based on their fiscal year. So I'll do tomorrow's TechHelp video based on that. That might give you the answer you're looking for.
Stanley Mc Keown OP  @Reply  
     
11 months ago
Sorry for late reply just getting some screen shots together
Stanley Mc Keown OP  @Reply  
     
11 months ago

Stanley Mc Keown OP  @Reply  
     
11 months ago

Stanley Mc Keown OP  @Reply  
     
11 months ago

Stanley Mc Keown OP  @Reply  
     
11 months ago
That's it with chart not summing up the quarters ie basically just still the months but giving the quarter number which is in the correct order although not summed up into each quarter
Stanley Mc Keown OP  @Reply  
     
11 months ago

Stanley Mc Keown OP  @Reply  
     
11 months ago
This last one is showing the chart before I fix all the formatting but now the quarter is in the  wrong place ie 4 should be before 1 but that's probably because the chart can only see Q1 and Q4 so it arranges in that order. ie it can't see my order from the YearMonthField.
Stanley Mc Keown OP  @Reply  
     
11 months ago
I think I need to make Q4 associated with year 2024 somehow and I suppose it won't matter if I say make Q4 in 2025 minus one year making it Q4 2024 ?

  Is my logic flawed there?
Richard Rost  @Reply  
          
11 months ago
Watch the tech help video that I just recorded for tomorrow. It'll go live at 9:00 a.m. Eastern.
Stanley Mc Keown OP  @Reply  
     
11 months ago
I got my quarters from a Choose(DatePart("q",[last_Done]),4,1,2,3)
Stanley Mc Keown OP  @Reply  
     
11 months ago
I will thanks Richard
Richard Rost  @Reply  
          
11 months ago
Stanley That's basically what I did in the video with an IIF statement. Choose works just fine.
Stanley Mc Keown OP  @Reply  
     
11 months ago
But you still end up with the same problem -- the chart will need some way to reference Q4 as Q4 of the previous year but I'm not sure how to do that. Maybe using yyyy -1 if quarter = Q4 would work.

ie I now have the sum of items done in their proper quarters but the query still orders them Q1, Q4 instead of Q4 Q1
ie
183 Q1
233 Q4

What I really need is
233 2024 - 4
183 2025 - 1

  But I'm not sure how to get to that -- maybe concatenation of quarter and year after an iif to put Q4 to previous year.

Richard Rost  @Reply  
          
11 months ago
Yes, you could create one field that concatenates the year and quarter together, and then you can sort your chart based on that concatenated field.

2024-4
2025-1
2025-2
2025-3

Stanley Mc Keown OP  @Reply  
     
11 months ago
I got it sorted -- I was trying to get the quarters from the "Month Done Query" -- OK for just seeing the quarters / month on a query but for  access charts you really need to have the quarters only and sorted properly as is the subject of this thread.

  What I did was to make another query off the "Month Done Query" which gets it's information from another query where I do the number crunching bit and the Start and End dates are sucked off a dedicated Reports form ( I made it from one of your videos -- which was very helpful thanks )

  The month done query is where the proper quarter is found using the Choose function and the count of items ( DevnumbsDone ) is counted.

  Then the new " Quarter Done query" is where the magic happens to change the year for Q4 with the formula;

   Q4YEAR: IIF([NewQuarterDone]=4,[NewYearDone]-1,[NewYearDone])&"-"&[NewQuarterDone]

  I did the same sequence of queries for Overdues in the same month hence I could make a percentage performance chart.
Stanley Mc Keown OP  @Reply  
     
11 months ago
This way I can have everything built into one application ie Access and it updates live so all the user needs to do to see the monthly or quarterly Percentage performance charts for quality control is set the Start and End Dates they wish to see a chart for and select which chart they want -- the start and end dates stay on the form so they don't have to type it in every time.

  Much better than having to export it to excel and poke around with that when it's just a simple chart they need to see and fast.
Stanley Mc Keown OP  @Reply  
     
11 months ago

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/22/2026 1:01:42 AM. PLT: 1s