Forum Discussion

MartinAa's avatar
MartinAa
Frequent Visitor
3 years ago
Solved

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
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  MartinAa ,

    I created some data:

    Table1:

    Table2:

    Here are the steps you can follow:

    1. Create calculated column.

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

     

    2. Result:

     

    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

2 Replies