I'm using this Sheetgo Attendance template on Google Sheets, but it's designed for US Schools so it's needed to sort by January to December. I will provide below the assets that I've have about it. Can someone help me with how to Query it?

Source (Google Drive): https://drive.google.com/drive/folders/1aEdUYuKHlaiCrNZShSt20swEu7u13-z4?usp=sharing


Source Data (Picture): G-Sheets

Where I need to edit the Query: Cell H-17 on tab Data Preparation Charts

The previous Query: =QUERY('Overview per month'!A:F,"SELECT A,AVG(B) GROUP BY A LABEL AVG(B) 'Presence rate'",1)

  • 1
    Welcome. That is a complicated, ready-made sheet by a company and you should NOT change the formulas since they are interlocked (except the ranges they refer to). Instead, read the instructions carefully and try to understand what they say. – marikamitsos Jan 14 at 13:28
  • Well, thanks for the answer! I will temporarily do the data adjustments by simply adding VLOOKUPs and more columns. Do you believe it's impossible to do it with Query? My knowledge on this Google Query is super limited still. – Will Jan 14 at 19:04

You can't order a query by month names because that would order them either alphabetically from A - Z or from Z - A. To achieve your ordering from January to December, you first need to create a mapping as follows:

1: January
2: February
12: December

Then you can order by month number to get the sorting correctly.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.