Forum Discussion

CJ_96601's avatar
CJ_96601
Helper V
4 years ago
Solved

Maximum and Average

Measure to get the maximum amount for each BN and then average the maximum amount.

 

Below is the sample data for reference.

 

BNAMOUNT
11000
12000
13000
21000
32000
43000
23000
34000
44000
1500
33500
54500

 

Appreciate your help.

  • I think you are looking for this:

    Average of Max values as per BN = AVERAGEX(SUMMARIZE(BNTable,BNTable[BN],"MaxBN",MAX(BNTable[AMOUNT])),[MaxBN])

    It gives an outcome of 3700 with the given data.

     

5 Replies

  • PC2790's avatar
    PC2790
    Community Champion

    I think you are looking for this:

    Average of Max values as per BN = AVERAGEX(SUMMARIZE(BNTable,BNTable[BN],"MaxBN",MAX(BNTable[AMOUNT])),[MaxBN])

    It gives an outcome of 3700 with the given data.

     

    • CJ_96601's avatar
      CJ_96601
      Helper V

      Thanks. 

      this is the result i was looking for.

      Now, what if i would like to get with code "BS" only.

      Below sample refer.

       

      BNAMOUNTCode
      11000BS
      12000BS
      13000H
      21000BS
      32000BS
      43000BS
      23000H
      34000BS
      44000BS
      1500BS
      33500H
      54500BS
  • Hi !

    average = AVERAGE('Table'[amount])
    max = max('Table'[amount])

     
    • CJ_96601's avatar
      CJ_96601
      Helper V

      Thanks.  But this is the result i expect.

       

       

      13000
      23000
      34000
      44000
      54500
        
      Average3700
      • PC2790's avatar
        PC2790
        Community Champion

        You can visualise it like this: