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

 

 



!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

Helpful resources

Announcements
May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors