Forum Discussion
How do I return a calculated table sorted by a specific column?
I think it would need to look like:
Table 3 = SAMPLE(10,TableTest,[Motivated]/[Base], DESC)
So you are sorting by the expression, instead of the static column. You could also try:
Table 3 = SAMPLE(1,TableTest,MAX(TableTest[Percentage], DESC)
Hi ALeef
Thanks for the examples, my results based on your suggestions are below. So - example 1 is still not sorting, despite doing the calculation in the SAMPLE function.
Also, example 2 is showing some strange behaviour, even though I put 5 in the first value of SAMPLE, it returns the whole 10 rows (and again, not sorting!). I would have thought it would have returned 5 rows? I still need to try your Distinct Count solution on the Sector rather than a Group By so will do that over the weekend.
Thanks
Simon