Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Calculating Product Average for Multiple Rows for a Single Item

Hi, 

Please could you kindly assist with the below. 

I would like to calculate the Average value of a product. (This product is in multiple rows within my workbook). When i calculate the average it gives me the total average of all the rows combined and not the single average Value, please see below my formula, what can i do to tweek it so it provides a single units average price and not the sum of the total Price count average for each product.

 

Below is my formula : 

 

Average Unit Selling Price =
CALCULATE(AVERAGE(('Model Selling Price'[Average Price])),ALL('Model Selling Price'[Average Price]))

I then want to display this in a bar chart for each product but because its giving the total average and not single average

Thanks in advance.
  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi Anonymous ,

     

    You can try to use following measure to calculate average per product:

    Average Unit Selling Price =
    CALCULATE (
        AVERAGE ( 'Model Selling Price'[Average Price] ),
        ALLSELECTED ( 'Model Selling Price' ),
        VALUES ( 'Model Selling Price'[Product] )
    )
    

    If above not help, please share some sample data for test and coding formula.

     

    Regards,

    Xiaoxin Sheng

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    You can try to use following measure to calculate average per product:

    Average Unit Selling Price =
    CALCULATE (
        AVERAGE ( 'Model Selling Price'[Average Price] ),
        ALLSELECTED ( 'Model Selling Price' ),
        VALUES ( 'Model Selling Price'[Product] )
    )
    

    If above not help, please share some sample data for test and coding formula.

     

    Regards,

    Xiaoxin Sheng