Forum Discussion

Rigoleto's avatar
Rigoleto
Helper II
8 years ago
Solved

Build Average and Max columns base a column

Hi guys,

 

Need yur help with some calcuation, I did build a new table and I need to insert two columns base on one, for instance, see the screen shot, Columns C has differents values than are needed to build a Max and an Average columns, Max column needs to show 200 as max value, get it from column c, Average columns needs to show the average, 93.33, frm Column C.

Any tips to get this work

 

Thanks in advance

 

  • Anonymous's avatar
    Anonymous
    8 years ago

    Rigoleto,

    Please check if the following DAX return your expected result, if not, please share more sample data and post desired result here.

    Max = CALCULATE(MAX(Table1[ColumnC]),ALLEXCEPT(Table1,Table1[ColumnA]))
    Average = CALCULATE(AVERAGE(Table1[ColumnC]),ALLEXCEPT(Table1,Table1[ColumnA]))



    Regards,
    Lydia

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    As columns:

     

    Max of column C = MAX([Column C])
    
    Average of C = AVERAGE([Column C])
    • Rigoleto's avatar
      Rigoleto
      Helper II

      HEY,

      I did try you solution before to post the message, let me ask you a question, can I gruping a column, just I need to get the average and max base on the line production plus Operation

       

      Rigo

      • Anonymous's avatar
        Anonymous
        Not applicable

        Rigoleto,

        Please check if the following DAX return your expected result, if not, please share more sample data and post desired result here.

        Max = CALCULATE(MAX(Table1[ColumnC]),ALLEXCEPT(Table1,Table1[ColumnA]))
        Average = CALCULATE(AVERAGE(Table1[ColumnC]),ALLEXCEPT(Table1,Table1[ColumnA]))



        Regards,
        Lydia