PowerPivot – A sample of custom Median & Mode function – Frankie Yuen : Share my experience
Please note the performance is not optimized for a very large dataset, try with your own data. Create a Median Meausre [Lowerbound] =MINX( FILTER( VALUES( BoxOffice[TicketsSold]), CALCULATE( COUNTROWS( BoxOffice ), BoxOffice[TicketsSold] = COUNTROWS( BoxOffice ) / 2 ), BoxOffice[TicketsSold]) [Upperbound]=MINX( FILTER( VALUES( BoxOffice[TicketsSold]), CALCULATE( COUNTROWS( BoxOffice ), BoxOffice[TicketsSold]