Forum Discussion
Calculate Averages by sample number
- 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?
Hi,
Thank you for your reply. You're right! I forgot to divide the numbers. Below is the edited post. Thanks
Before
Chemical, sample number, Value
A, 11111, 5
B, 11111, 6
C, 11111, 4
A, 11112, 8
B, 11112, 9
C, 11112, 10
I would like this to become
Chemical, sample number, Value, Average
A, 11111, 5, 5
B, 11111, 6, 5
C, 11111, 4, 5
A, 11112, 9, 9
B, 11112, 8, 9
C, 11112, 10, 9