## Cross-Tab Averages for Entire Table in Each Cell

## Cross-Tab Averages for Entire Table in Each Cell

(OP)

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.

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

## CODE

Hope this helps.

Cheers

Pete

## 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

Ed

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

Glad it helped.

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