# How to average values along a direction in space?

**URL:** https://discourse.paraview.org/t/how-to-average-values-along-a-direction-in-space/5922
**Category:** ParaView Support
**Created:** [November 28, 2020, 5:10pm UTC](https://discourse.paraview.org/t/how-to-average-values-along-a-direction-in-space/5922 "2020-11-28T17:10:22Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Muhammad\_Zangeneh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_zangeneh/32/1844_2.png) [@Muhammad\_Zangeneh](https://discourse.paraview.org/u/Muhammad_Zangeneh)
#### Post date: [November 28, 2020, 5:10pm UTC](https://discourse.paraview.org/t/how-to-average-values-along-a-direction-in-space/5922/1 "2020-11-28T17:10:22Z")

</div>

Hello,  
I have a 3D airfoil case which I want to calculate the average of the fields in the spanwise (z) direction and finally get a 2D plane(xy) which the averaged values are set on it.  
Is this possible?

Thanks

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 30, 2020, 9:32am UTC](https://discourse.paraview.org/t/how-to-average-values-along-a-direction-in-space/5922/2 "2020-11-30T09:32:28Z")

</div>

Slice + Descriptive Statistics ?

---

<div class="post-metadata">

### Author: ![Muhammad\_Zangeneh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_zangeneh/32/1844_2.png) [@Muhammad\_Zangeneh](https://discourse.paraview.org/u/Muhammad_Zangeneh)
#### Post date: [December 1, 2020, 7:53am UTC](https://discourse.paraview.org/t/how-to-average-values-along-a-direction-in-space/5922/3 "2020-12-01T07:53:16Z")

</div>

Thank you, but Descriptive Statistics gives the average of all points on the slice.

I need the average of slices!  
For example, I have 32 slices with exactly same number of points which they only differ in the value of z coordinates. I want to average all of them and finally have 1 slice which is the average of all of the slices.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [December 1, 2020, 9:09am UTC](https://discourse.paraview.org/t/how-to-average-values-along-a-direction-in-space/5922/4 "2020-12-01T09:09:05Z")

</div>

This is much more specific, this is doable with either the PythonCalculator or ProgramableFilter, but not trivial.

---

<div class="post-metadata">

### Author: ![chang\_yan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/chang_yan/32/9426_2.png) [@chang\_yan](https://discourse.paraview.org/u/chang_yan)
#### Post date: [June 18, 2022, 7:04am UTC](https://discourse.paraview.org/t/how-to-average-values-along-a-direction-in-space/5922/5 "2022-06-18T07:04:57Z")

</div>

Hi, I was wondering if you solve this problem. I want to get a spanwise spatial average field by paraview, too.
