Median calculation in DAX
I recently discussed with Darren Gosbell about how to calculate the Median in DAX.
The problem is to make the calculation using a measure, so that you can use it in a dynamic way into a PivotTable. We have a People table with three columns: Gender, Customer and Age (you can see the table in the screenshot below). The Median formula can be defined in this way: