Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Calculate Averages by sample number

Hello,    I have a dataset where i would like to caclualte the average per sample number.  Below is how the data is displayed in the report   Chemical,   sample number, Value  A,               ...
  • Geradav's avatar
    7 years ago

    Hi Anonymous 

     

    Here is the DAX statement you can use

     

    AvgSampleNumber =
    CALCULATE (
        AVERAGE ( DataSetTabl[Value] ),
        ALLEXCEPT ( DataSetTabl, DataSetTabl[Sample number] )
    )

    Does that work for you?