Calculating results by combining two tables in MSaccess

khandelwal

New Member
Joined
Dec 19, 2018
Messages
4
I want to draw a result based on data available in two different tables in the same database. Basically, I want to calculate the % share from both of these tables
My Table 1 looks like this and has data somewhat like this.
| Code | Category | |------|----------| | ABC | 123 | | BCD | 145 | | DEF | 0 | | ACF | 5 | | BCF | 1588 |
My Table 2 looks like this and has data somewhat like this.
| Code | Category | |------|----------| | ABC | 12301 | | BCD | 14502 | | DEF | 3255 | | ACF | 7049 | | BCF | 15234 |
I want to divide Table A result matching to Table 2 results in a single query. My outcome should look like this
| Code | % | |------|--------| | ABC | 1.00% | | BCD | 1.00% | | DEF | 0.00% | | ACF | 0.07% | | BCF | 10.42% |
Need help with a way to calculate the same in MSAccess.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
your table is not designed correctly for a database.
for a db, there would only be 3 columns:
date, code, cata
1/1/2018,ABC
123
1/2/2018,
ABC 12301
1/1/2018,
BCD145
1/2/2018,
BCD14502
<colgroup><col width="64" style="width: 48pt;" span="3"> <tbody> </tbody>

youd have better results with Excel


<colgroup><col width="64" style="width: 48pt;" span="2"> <tbody> </tbody>
 
Upvote 0

Forum statistics

Threads
1,215,049
Messages
6,122,864
Members
449,097
Latest member
dbomb1414

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