Straight tables sorted differently between app and Access Point
So, I'm having a big issue and I'm losing my mind. Right now we have a document already built and worked on which we compile A LOT of information, and present it to the user as a ranking, in which a series of expressions show a final value which is then ranked between a single dimension and its values. This process is repeated 6 more times so we end up with 7 different tables but we also have different sheets witht ables each and... okay yeah, you get it.
In our main sheet (called Totals) we show most values in the entire document so the straight table has a solid 70+ expressions, and most of them make liberal use of the Column() function calling past expressions. This is done as to not repeat expressions since this would bloat the latter expresions and make them dozens of lines long making it hard to give the document maintenance if needed.
The thing is, this works fine and dandy. In my app the ranking is shown properly and it behaves as expected. Yet, when we publish the document and check it via the access point the sort by Ranking is ignored and instead it sorts via the dimension in alphabetical order, despite the fact that at no point I'm setting it to be that way.
This is an example of how it looks in my devapp, working as intended and as expected:
Yet this is how it looks when I open the app via the Access Point:
As you can see, it ignores the sorting by Rank and instead sorts alphabetically. In the Sort options inside Properties this is how things are set up:
Rank is the expression, and Coordinador is an example of the single Dimension we use in this specific straight table. The Rank sort gets ignored completely even though the sort priority is set up properly. Now, I've been trying to troubleshoot this for a solid 2 days or so trying everything I can, and I discovered that under certain circumstances I could re-sort the column via forced methods (i.e. Interactive Sort which is intended to be off for the final app, the user should't be able to change the sort) but after the options are turned off and I use the "Remove last document state" option from the Access Point the sort goes back to alphabetical which makes me think that for some reason the documents considers this the "default", despite the fact that at no point I'm sorting alphabetically nor setting it to do so.
As I said, this straight table has A LOT of expressions, and due to user requirements they need to see the Rank expression first, then the Dimension and then the rest of the expressions so I had to drag the first expression to the left of the Dimension which might be causing issues but I'm not sure because redragging the dimension to be first did nothing.
Also, I was reading some similar questions and apparently there's bug using Publisher regarding the sorting of certain tables? The issue is, in my other sheets I have tables working the exact same and they do behave as intended no matter what, the main difference being they have way less expresions (20 at most) and the rank expression/sort column is placed at the end of the table.
Lastly, I can't force the Dimension to be sort by an expression since the expression used for the Rank involves column names and this the expression itself doesn't resolve since those column names don't interact with the Expression field on the sort tab (this is the expression itself):
I've also tried using Column(1) as an expression to sort the dimension but it doesn't work either, I'm not sure if inside an expression box in the sort tab there are no "columns" to track the number of.
At this point I'm absolutely stumped. I don't want to invest much more time into this because it should be a non issue since it should work, every other table in every other sheet work as intended, why are these ones misbehaving?!? Also, I don't want to spend too much time doing more troubleshooting (I've read that every now and then charts and tables get corrupted when a lot of dimensions -not expressions- are involved and the solution is to remake the chart all over again which I don't want to do because... well, 70 expressions times 7 tables, that'll be a solid amount of works days we don't have the time to invest on again)
Please, if anyone has any insight or suggestions I'll be happy to hear them!