Forum Discussion

manisharora's avatar
manisharora
Regular Visitor
10 years ago
Solved

Creating new column

Hi Team,   I have two table :- one is Product and 2nd is Order table.  We have UNIT COST field from Product table and QUANTITY field from Order Table..   My requirment is to create a new column ...
  • KGrice's avatar
    10 years ago

    I imagine the Product table has one line item for each product. If that's the case, you can create a relationship between the Product table and Order table on the product identifier, e.g., ProductID, or whatever uniquely identifies the product. Look for the Manage Relationships button in the Home tab of the ribbon to get started with the relationship.

     

    Once that's complete, you can create your new column in your Order table as

     

    COST = RELATED(ProductTableName[UNIT COST]) * [QUANTITY]