Getting Month periods to show in ACCESS query as 0 when there is no data for the month

Access Discussion in 'Microsoft Office' started by Smiler65, Mar 7, 2016.

  1. Smiler65

    Smiler65

    Joined:
    Mar 7, 2016
    Likes Received:
    0
    DATE TEST
    Month
    Total
    2015/04 1
    2015/07 1
    2015/09 1
    2016/01 1
    2016/02 1

    As you can see from the above results an Access query there are periods without any data. I need them to be displayed within the query as a zero. Can someone tell me how to achieve this easily please.

    My query currently reads:

    SELECT Format([TimeOfCall],"yyyy/mm") AS [Month], Count([INCIDENT NEW].SALESIncidentIdentifier) AS Total
    FROM (SALES LEFT JOIN VICTIM ON SALES.IncidentIdentifier = VICTIM.SALESIncidentIdentifier) RIGHT JOIN [INCIDENT NEW] ON SALES.IncidentIdentifier = [INCIDENT NEW].SALESIncidentIdentifier
    WHERE (((VICTIM.VictimType)="1"))
    GROUP BY Format([TimeOfCall],"yyyy/mm");
     
    Smiler65, Mar 7, 2016
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.