Forum Discussion

Rich_P's avatar
Rich_P
Helper II
7 years ago
Solved

Define Column Order using SELECTCOLUMNS

I'm using SELECTCOLUMNS to project a subset of fields from my data model onto an Excel worksheet. The example uses the expression below to force the columns to appear in the order I want them display...
  • v-frfei-msft's avatar
    7 years ago

    Hi Rich_P ,

     

    As this casethe ORDER BY clause is part of the EVALUATE statement and the drillthrough expression just accepts a table expression. One possible work around would be to wrap your SELECTCOLUMNS in a TOPN. You could then either set a reasonable limit on the drillthrough to stop people from trying to extract too much data or you could just put a huge number for the "N" amount (eg. 2 billion) so that it just does sorting, but does not realistically limit the rows.