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
MartinAa
Frequent Visitor

Create new column from a measure .

Hi All ..!! 
I am just wondering how to convert a measure  to a new column in the Data  . 

Basically i have 4 columns from two different tables . 

 

Table1[PersonID]

Table1[HoursAllocated]

Table2[Actual Hours]

Table2[HoursDifference]---> Measure. (Which gives the correct results)

The above Measure is - 

Hours_Difference = AVERAGEX(Table2, Table2[Actual Hours] - AVERAGEX(Table1, Table1[HoursAllocated]))
 
What i need to do is instead of  creating this as Measure , i need to create this as a new column in Table2 Data. 
So when i try to paste the measure in NewColumn , it gives the same single result for all the records which is wrong. 
 
Thank you in Advance for your knowledge contribution...!! 
-MartinA
1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @MartinAa ,

I created some data:

Table1:

vyangliumsft_0-1675751354011.png

Table2:

vyangliumsft_1-1675751354011.png

Here are the steps you can follow:

1. Create calculated column.

Column_Hours_Difference =
'Table2'[Actual Hours] -  AVERAGEX('Table1','Table1'[HoursAllocated])

 

2. Result:

vyangliumsft_2-1675751354014.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

Hi  @MartinAa ,

I created some data:

Table1:

vyangliumsft_0-1675751354011.png

Table2:

vyangliumsft_1-1675751354011.png

Here are the steps you can follow:

1. Create calculated column.

Column_Hours_Difference =
'Table2'[Actual Hours] -  AVERAGEX('Table1','Table1'[HoursAllocated])

 

2. Result:

vyangliumsft_2-1675751354014.png

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

amitchandak
Super User
Super User

@MartinAa , That will not help, You have create a measure.

 

or copy value from one table to another

 

refer 4 ways (related, relatedtable, lookupvalue, sumx/minx/maxx with filter) to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

 

 

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.