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 Anonymous
Here is the DAX statement you can use
AvgSampleNumber =
CALCULATE (
AVERAGE ( DataSetTabl[Value] ),
ALLEXCEPT ( DataSetTabl, DataSetTabl[Sample number] )
)Does that work for you?
- Anonymous7 years agoNot applicable
That worked!! Thank you for your help.
I have another issue now. Sometimes the Value can be blank and if so, the formula ignores that e.g.
1010101, 13
1010101,
1010101, 85
1010101,
1010101, 31
The formula is returning 43 but i would like it to return 25.8
- Anonymous7 years agoNot applicable
Thank you all for your replies.
This did do the trick for me Geradav
AvgSampleNumber = CALCULATE ( AVERAGE ( DataSetTabl[Value] ), ALLEXCEPT ( DataSetTabl, DataSetTabl[Sample number] ) )I have another issue now where i would like to calculate the average between two dates e.g.
Currently its calculating the average over all sample numbers while ignoring the sample date.
I would like to calculate and display the average between
2016-17
2017-18
2018-19
If sample number date is 01/05/18, i would like the average column to display the average by calculating over all samples from 2018 only.
Any help would be appreciated!
- Geradav7 years ago
Responsive Resident
Maybe you'll need to open a separate post for that.
And providing some sample data might help too