Byron Kelly Posted March 19, 2019 Share Posted March 19, 2019 Hello I am trying to do some basic math on two different data sets. I have one data table that has oil productionnumbers per year for a list of companies. I have a second data table that has cost per year for the same set of companies. The data tables are related by the company name (ID #). I would like to divide the cost per year by the production per year for each company. In my mind, this simple math would be: Cost per bbl of production = Cost per year ( data table 2) / Production per year (data table 1) . This seems like a simple thing to do but I cant figure out how to insert a calculated colum using metrics from two different data tables. Can somebody give me a hand Thanks Link to comment Share on other sites More sharing options...
Kirsten Smith (she/her) Posted March 20, 2019 Share Posted March 20, 2019 You currently cannot create a calculated column using columns from two different data tables. You'll need to Insert the necessary column into the other data table, then you can create the calculated column. Link to comment Share on other sites More sharing options...
Byron Kelly Posted March 20, 2019 Author Share Posted March 20, 2019 Ok. Is there a walk through on how to do this I am having trouble matching colums when inserting the data from one data table into another. For example, I have a colume that is company name by ID number, but the two data tables have a different number of entries into this company name ID column. Is there a way to match on common values only Link to comment Share on other sites More sharing options...
Kirsten Smith (she/her) Posted March 20, 2019 Share Posted March 20, 2019 You will be prompted to select a Join method so you can specify that you only want to match records in the original data table. Link to comment Share on other sites More sharing options...
Byron Kelly Posted March 20, 2019 Author Share Posted March 20, 2019 So I should start with the data set that has the most records then I guess, and add the data to that data set. In general, for plotting data, is it better to have a single data table that is a composite of multiple data tables, or to have individual data tables that are connected via a relationship on a matching column Link to comment Share on other sites More sharing options...
Kirsten Smith (she/her) Posted March 20, 2019 Share Posted March 20, 2019 There's no specific answer to one table vs multiple tables, it depends on how many tables, how many rows and/or columns, and the underlying data source. You'll need to make adjustments based on your actual data. Link to comment Share on other sites More sharing options...
Byron Kelly Posted March 20, 2019 Author Share Posted March 20, 2019 I have 9 data tables, each with 49 columns and 750,000 rows. Of the 49 columns, about 4 are unique to each data table. The data source is an API feed that I am connecting to via OData. Any thoughts Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now