Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
manisharora
Regular Visitor

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 that would be named as "COST" that is formulated as (UNIT COST*QUANTITY)..

How can i get this column.....  please help me to resolve it..

 

Thanks

Manish Arora

 

 

1 ACCEPTED SOLUTION
KGrice
Memorable Member
Memorable Member

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]

  

View solution in original post

4 REPLIES 4
sagarika2017
Regular Visitor

Hi..i am new to power BI as well as new to this forum.

 

I am trying to create a new column by using an existing column in the conditional column formula

i am using if segment (existing column) contains mid, emerging then so n so

 

the values of segment column are mid, emerging and large and strategic. still i am not gettig the exact result. is the condition thing case sensitive?

sagarika2017
Regular Visitor

hi..i am new to Power BI and also to this forum.

 

i am trying to create a new column by giving a condition as if segment(an existing column) contains  mid, emerging and so on

the values of the segment column are mid, emerging, large etc. but still its not working. is the condition case senitive? how do we write mid, emerging??

KGrice
Memorable Member
Memorable Member

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]

  

Thanks. GRice...it's working.. Smiley Happy

 

Best Regards

Manish Arora

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.