Results 1 to 4 of 4
  1. #1
    priusman is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    2

    Adding the value of Crosstab fields together to further summarize data

    Hi there,

    I have this crosstab query, for which I am trying to further group the data. Ex. I would like to add the values of the three fields circled in red under a single group field called "Boating".
    Click image for larger version. 

Name:	Crosstab.JPG 
Views:	7 
Size:	53.9 KB 
ID:	32324

    I thought creating a simple query based on the crosstab in which I would add a calculated field would work. Sounded simple enough.
    Click image for larger version. 

Name:	QueryCalculatedField.JPG 
Views:	7 
Size:	74.2 KB 
ID:	32325


    Unfortunately my new calculated field does not return anything.
    Click image for larger version. 

Name:	QueryResult.JPG 
Views:	7 
Size:	30.7 KB 
ID:	32326
    I have several groups of fields like that in my crosstab that I would like to group together.

    Can someone help?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Arithmetic with Null returns Null. Have to deal with the Null. Can use Nz() function. Nz([field1],0) + Nz([field2],0) + Nz([field3],0)
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    priusman is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Jan 2018
    Posts
    2

    Worked!

    Thanks June7 that worked perfectly! Good lesson.


    Quote Originally Posted by priusman View Post
    Hi there,

    I have this crosstab query, for which I am trying to further group the data. Ex. I would like to add the values of the three fields circled in red under a single group field called "Boating".
    Click image for larger version. 

Name:	Crosstab.JPG 
Views:	7 
Size:	53.9 KB 
ID:	32324

    I thought creating a simple query based on the crosstab in which I would add a calculated field would work. Sounded simple enough.
    Click image for larger version. 

Name:	QueryCalculatedField.JPG 
Views:	7 
Size:	74.2 KB 
ID:	32325


    Unfortunately my new calculated field does not return anything.
    Click image for larger version. 

Name:	QueryResult.JPG 
Views:	7 
Size:	30.7 KB 
ID:	32326
    I have several groups of fields like that in my crosstab that I would like to group together.

    Can someone help?

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    have you tried having a row heading column in your crosstab query - something like

    BoatingTotal:sum(iif([activity] like "Boating*",1,0))

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

Similar Threads

  1. Replies: 1
    Last Post: 08-26-2013, 05:08 PM
  2. Replies: 1
    Last Post: 08-06-2013, 07:52 PM
  3. Replies: 25
    Last Post: 10-17-2012, 01:51 PM
  4. Replies: 8
    Last Post: 09-26-2012, 01:51 PM
  5. Replies: 1
    Last Post: 02-03-2012, 05:39 PM

Tags for this Thread

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