Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


Cross-Tab Averages for Entire Table in Each Cell

Cross-Tab Averages for Entire Table in Each Cell

CR 2011
Oracle DB

I am counting police incidents (or calls). Lets assume there are 1000 incidents in a one month period.
My cross-tab rows are hours-of-day increments so there are 24 rows. A formula counts how many calls fall withing an hourly time period. 00, 01, 02, 03.....all the way to 23.
My columns are the days of the week so there are 7 columns.
So we have 168 cells.

I need the averages for all 168 cells so the number of calls in each cell should be divided by the 1000 monthly calls.

When trying to calculate percentage of all calls within the cross-tab, I am only getting averages for each column or row, depending on which I choose.

I a hoping I can do this in a cross-tab rather than having to create a manual cross-tab.

Thanks for any assistance.

RE: Cross-Tab Averages for Entire Table in Each Cell

I would do it this way.

  • Right Click the Cross Tab field and select Format Field;
  • Click on the x2 button beside the Display String on the Common Tab;
  • Enter the following Code:


    , where {Table.Column} is a database field you count to get the correct number.

  • Hope this helps.


    RE: Cross-Tab Averages for Entire Table in Each Cell


    It worked perfectly.

    What is the [/li] supposed to do or is this a reference? I did not include this and it worked fine.

    Thank you


    RE: Cross-Tab Averages for Entire Table in Each Cell

    Whoops, sorry. Ignore that bit of code (as I'm sure you worked out). It was actually a bit of surplus code from the post that inserts the bullet points.

    Glad it helped.

    RE: Cross-Tab Averages for Entire Table in Each Cell

    Perfect. Thanks Pete

    Red Flag This Post

    Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

    Red Flag Submitted

    Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
    The Tek-Tips staff will check this out and take appropriate action.

    Reply To This Thread

    Posting in the Tek-Tips forums is a member-only feature.

    Click Here to join Tek-Tips and talk with other members!


    Close Box

    Join Tek-Tips® Today!

    Join your peers on the Internet's largest technical computer professional community.
    It's easy to join and it's free.

    Here's Why Members Love Tek-Tips Forums:

    Register now while it's still free!

    Already a member? Close this window and log in.

    Join Us             Close