Forum Discussion
Order by with selectcolumns. Using in SSAS Tabular
- 8 years ago
I posted my question over at the SSAS forum and got some help from Darren Gosbell. If you see anything by him read, he's great. He suggested I wrap in TOPN. I havn't had time to implement yet except in SSMS as a query. I did notice the sorting is not guarentteed according to the documentation. Here my link to the SSAS thread.
I am creating reports in Excel first, so its the drill through in Excel that I am trying to get to work. I posted my issue here because I was under the impression this is the best place for DAX questions.
I am going to try creating a caculate table in SSAS or adding the related feilds to my fact table or determining what is causing the sort. I may also add a column for sorting to my fact table.
yes, this work in SSMS and dax studio, but returns an error in SSAS Tabular. If I remove the order by clause it works in SSAS Tabular.
evaluate SELECTCOLUMNS ( 'fSales', "Document No", RELATED ( dInvoice[InvDocNum] ), "Line No", RELATED ( dInvoice[DocLineNum] ), "Sub Line No", RELATED ( dInvoice[DocLineSubNum] ), "Order date", RELATED ( dDate[Date] ), "Sales", [SalesAmt], "Accruals", [AccrualAmt], "CrM", [CrMemoAmt], "Other", [OtherAmt], "Total", [Amount] ) order by [Line No] desc
computermike,
As the question is more related to SSAS, I would recommend you post the question in the SSAS forum at https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlanalysisservices . It is appropriate and more experts will assist you.
Regards,
Lydia
- computermike8 years agoHelper I
I posted my question over at the SSAS forum and got some help from Darren Gosbell. If you see anything by him read, he's great. He suggested I wrap in TOPN. I havn't had time to implement yet except in SSMS as a query. I did notice the sorting is not guarentteed according to the documentation. Here my link to the SSAS thread.