Forum Discussion
Sort columns in matrix when connected to SSAS (Live Connection)
I was struggling with this as well with a live connection to SSAS and this thread helped me think about it in a different way and it worked. So thanks to everyone that posted.
I first tried to do a dense_rank in the SQL statement for the SSAS table in the model and used that as the sort by in the SSAS for my date column, but that didn't seem to work.
I then duplicated my date column in the SQL query and used that column to create a calculated column in SSAS using RankX (=RANKX(HistoricalOBCaseLoad,HistoricalOBCaseLoad[RunDateOrderColumn])). Then I used this calculated column as the sort by for my date column. That seemed to work and now my matrix and my chart show the most recent date on the left side. A calculated column might not be the best option if your data set is really big but mine is relatively small.
Thanks again for this thread!