cancel
Showing results for 
Search instead for 
Did you mean: 
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
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors