Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Custom column - Average excluding "NA" values

Dear all,   I kindly need your expertise for creating a custom column that calcuates the average of several columns. The problem is I have a dataset that includes some "NA" values:   White Bl...
  • Greg_Deckler's avatar
    8 years ago

    Use something along the lines of:

     

    Measure = AVERAGEX(FILTER('Table',[Yellow]<>"NA"),[Yellow])
  • sgsukumaran's avatar
    8 years ago

    Option 1: As pointed out use filter in your query

    Option 2: Default value to 0 when blank or NA occurs that way your regular calculation would work.

  • v-danhe-msft's avatar
    8 years ago

    Hi Anonymous,

    Based on my test, you could refer to Greg_Deckler's solution, also, you could refer to replace the 'NA' value in query editor:

     

     

    Hope it could help you.

     

    Regards,

    Daniel He