Cross Tab Problem

B

Bob Ewers

I have a cross tab query that lists companies as rows and actions as columns. Some actions can be either true or false. Right now if a company has actions that are true and false the company appears twice with true actions totaled on one line and false actions on another. Is there a way to combine these two lines so that true actions are summed in one column and false actions summed in another column in the same line. Thanks in advance.
 
D

Duane Hookom

Please provide a sample of your table structure and data as well as how you
expect to display it in your query output.

--
Duane Hookom
MS Access MVP


Bob Ewers said:
I have a cross tab query that lists companies as rows and actions as
columns. Some actions can be either true or false. Right now if a company
has actions that are true and false the company appears twice with true
actions totaled on one line and false actions on another. Is there a way to
combine these two lines so that true actions are summed in one column and
false actions summed in another column in the same line. Thanks in advance.
 
B

Bob Ewers

I have four tables

EmployeeID: AutoNumbe
Employee: Tex

CompanyID: AutoNumbe
Company: Tex

ActionTypeID: AutoNumbe
ActionType: Tex

ActionID: AutoNumbe
EmployeeID: Numbe
CompanyID: Numbe
ActionTypeID: Numbe
ActionDate: Dat
Num_Actions: Number (some actions have multiple occurances per employee per day: but they will be true or false as a group
ActionOccur: Boolean

I would like the date to display as follows
ActionTypeA(True) ActionTypeA(False) ActionTypeB(True) ActionTypeB(False) ActionType C....
CompanyA
Company
 
D

Duane Hookom

You might want to look at the sample crosstab reports from
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane

--
Duane Hookom
MS Access MVP


Bob Ewers said:
I have four tables:

EmployeeID: AutoNumber
Employee: Text

CompanyID: AutoNumber
Company: Text

ActionTypeID: AutoNumber
ActionType: Text

ActionID: AutoNumber
EmployeeID: Number
CompanyID: Number
ActionTypeID: Number
ActionDate: Date
Num_Actions: Number (some actions have multiple occurances per employee
per day: but they will be true or false as a group)
ActionOccur: Boolean

I would like the date to display as follows:
ActionTypeA(True) ActionTypeA(False)
ActionTypeB(True) ActionTypeB(False) ActionType C....
CompanyA
CompanyB
.
.
.

The cooresponding Num_Actions will be totaled in the table. Hope this is
what you needed to see. Thanks.
 

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

Ask a Question

Top