I will ask @EnterpriseDNA to break this thread into a separate topic starting with post #5.
One question I have for you is whether using R is a possibility? Because what you could do is shape your data as needed in Power Query, invoke an R script from within Power Query to calculate the descriptive statistics you need easily and then have it output those results seamlessly back out to Power Query, all within the same query.
For an example of this technique, you can see our Data Challenge #11 write up, where we used the same approach to retrieve regression results that were then fed back into a Power B native scatterplot visual.
- Brian