Combining and Counting by month

Tcurtis

Board Regular
Joined
Aug 15, 2009
Messages
149
I have broken down a lot of data into three tables that I need to count by month. It took a lot of filtering in other queries to get these three tables. Each table represents a type of part, Inhouse, Outsource and New. How can I combine all of these tables into a chart that gives me the count of each by month and kind? Do I need to add a field in each table that identfies the part as one of these three and if so how do I do that? Or can I make a query that will combine these tables and give me a count of each by month and name of table? I am at a loss on this one. Thanks
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Can the data you need out of these three tables be combined into one? If so, I'd recommend a PivotTable with a PivotChart.

Edit: I am sorry, I thought I was in the Excel forum! Although, if you can join the relevant information into one chart, you could import that into an Excel PivotTable and chart the result.
 
Last edited:
Upvote 0
You can combine the three tables if they have the same structure:

SELECT *, 'Table1' As SourceTable FROM Table1
UNION ALL
SELECT *, 'Table2' As SourceTable FROM Table2
UNION ALL
SELECT *, 'Table3' As SourceTable FROM Table3


Then you can run a query on that query to sum, count, or what have you.
 
Upvote 0

Forum statistics

Threads
1,215,218
Messages
6,123,676
Members
449,116
Latest member
HypnoFant

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top