Forum Discussion

Rygar's avatar
Rygar
Helper II
4 years ago
Solved

Calculate simple Average of Column

Dear Community,

 

this should be simple, but I dont know how to do it in M Language. Value is given, the second Column (Average of Column Value + 10) should be calculated:

ValueAverage of Column Value + 10 
1030 
2030 
3030 

 

Thanks and regards, Michael

  • Use below formula in a custom column where #"Previous Step" should be your previous step

    = List.Average(#"Previous Step"[Value])+10
  • It's generally better to do this sort of thing with a measure in DAX, but if you have to do it in the query editor, you can write a custom column like this:

    You'll need to use whatever the previous step name was instead of #"Changed Type".

4 Replies

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    Most Valuable Professional

    Use below formula in a custom column where #"Previous Step" should be your previous step

    = List.Average(#"Previous Step"[Value])+10
  • It's generally better to do this sort of thing with a measure in DAX, but if you have to do it in the query editor, you can write a custom column like this:

    You'll need to use whatever the previous step name was instead of #"Changed Type".