daxpowerpivot

PowerPivot - Average of column for a variable repeating for each row based on time period


I may be missing something obvious here but as someone who isn't very good I have tried with no success.

Below is my raw data. 3 Variables with differing dates and outputs.

enter image description here

Below is an image of my output at the moment and what i'd like my output to look like.

Measure 1 (Column 'I') being the average of all the values in Column 'D' and repeating for each date / output row.

enter image description here

Any assistance on how I could create a calculated column / measure to achieve the desired output would be much appreciated.

Thanks in advance


Solution

  • Look at using ALLSELECTED(...).

    Measure 1:=
     CALCULATE(
      AVERAGE( 'Raw_Data_Table'[Output] ),
      ALLSELECTED('Raw_Data_Table')
     )