Forum Discussion
How do I return a calculated table sorted by a specific column?
Hi Aleef, thanks for the reply.
All your assumptions are correct about what I am trying to achieve and I will explore your suggestions fully over the next few days. Just as a starter though, I referenced the calculated table using the SAMPLE function and still, the data returns unsorted by the percentage column (as image below). I'm puzzled why it returns like that, I suspect I need to explore a bit more about evaluation and the order of which evaluation happens but logically (in my mind anyway) I feel this should return the table sorted descending by percentage!
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)