- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Getting the sort order in a table and storing it in a column or measure
Hey!
I've also made this as a ~90 second video to aid communication: https://www.youtube.com/watch?v=HWciQ7tAn6A
My challenge, which I just can't drop, is as follows.
I have a PowerBi table element and I need to include the current (live) sort somewhere in the table (via an added column or measure).
The reason for this is that, I've embedded a Power Apps visual to show more details from the records in the table. It works great, the records can be navigated and a filtered to matche the PowerBi table. The additional dimention and interactivity is wonderful.
It's particularly brilliant to be able to navigate the list via the app as well as the PowerBi table.
But.... it only really make sense if the record navigation matches the table order, which it does with the default sort (ID). If I add a filter and click a column (to change the sort), the data exposed via [@PowerBIIntegration].Data is filtered, but always in the same order.
I know that, via dax / added column, I could add a next of ISFILTERED ( Column ) and output a string of the name of the column(s) tthat have been filtered, which the app would be able to read and act upon. But, I cannot see a way to access the sort / order for the query outputting the table.
The table starts off sorted by ID. My only backup is to keep it sorted by ID and somehow stop the users from clicking the table column headers and sorting (transparent button hack - yuk).
Any experience or ideas would be most welcome!
Cheers,
Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

So I'm not an expert in this, and I'm not sure if I understand your requirements exactly, but I think you want to figure out the current sort order, and then put it back to that same order at any point in time afterwards?
If so, what you could do right at the beginning in Power Query, is to add an Index Column (starting from 1?), and that will essentially save your initial sort order. At any point in time afterwards, you just have to sort on the Index column whenever you want it to revert back to the initial sort order.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Steven,
Unfortunately - no developments. I'm hoping that there will be an update to the integration.
Added to the feature request group, please support:
https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=c43e6c1a-c558-ee11-a81c-6045bdb0416e
Cheers,
Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey Matt,
I am also trying to grab the sorted column. Any luck finding a solution yet?
Best,
Steven

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
03-05-2018 05:24 PM | |||
11-06-2023 06:50 AM | |||
06-06-2024 07:06 AM | |||
07-08-2024 02:22 PM | |||
05-28-2018 02:57 AM |
User | Count |
---|---|
141 | |
115 | |
84 | |
63 | |
48 |