Results 1 to 3 of 3
  1. #1
    nggman is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    27

    Include null period in crosstab query

    I have a query that spits out totals for a given month. My column heading in the query are the periods.

    Ex.

    201804 201805 201806 201808
    $3333 $541180 $66725 $8339



    I want my query to include 201807 even if it does not have a dollar amount.
    This is the SQL line for the period column header: PIVOT [dbo_RX Reporting].Period
    I have tried PIVOT Nz([dbo_RX Reporting].Period) but that did not work. Is there a way to do this?

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    use the column headings in the query properties

    in sql it will look something like

    PIVOT gMth IN (201814,201805,201806,201807,201808)

  3. #3
    nggman is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Oct 2017
    Posts
    27
    Thank you. That worked.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 11-18-2016, 08:41 AM
  2. How to include null values in query
    By ittechguy in forum Queries
    Replies: 2
    Last Post: 10-20-2015, 04:45 PM
  3. Crosstab Query Showing Null Values
    By equestrian in forum Queries
    Replies: 2
    Last Post: 09-22-2015, 03:24 AM
  4. Replies: 4
    Last Post: 03-29-2014, 01:29 AM
  5. Replies: 3
    Last Post: 06-04-2013, 01:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums