Forum Discussion
How to sort the drillthrough pages?
I have multiple separated pages for drillthrough to, as below, how can I sort the order of these pages? the default order is the paged created order and cannot find where to sort.
For example, I want to sort the 5 pages as:
- All Bars
- All Donuts
- Data Table + Bar
- Data Table + Donut
- Data Table
Please vote the idea:
Thanks
9 Replies
- AnonymousNot applicable
Credit: Anton Troshin
The solution Anton found was to create duplicates of the drill through pages in the wanted order after which you delete the "Duplicate of " - beginning of the page name and it's done.Delete the original page 2 and page 3.
Delete the text "duplicate of"
Thank you Anton for contributing the solution to the Power BI community .
- AnonymousNot applicable
thanks for the idea, this should be Great for others. But fyi for those who has bookmark, this trick will make you do bookmark again because bookmark lose their original page
- Lisa_ReaFrequent Visitor
Great solution to a problem that I, too, had! Silly that we have to do this but grateful to the community hear for always having workarounds to these liitaitons. THANKS!
- JoeChampFrequent Visitor
What a horrible default. In what universe would anyone want a drill list to default to created date. Mine as well be random. This is very sloppy. Need ability to sort.
- GordonliljSolution Sage
Hi,
I believe the drillthrough is sorted by when the pages were created. So the page that was created first will be the first option in the drillthrough and so on.
- v-chuncz-msftCommunity Support
j_w ,
As far as I know, it is not yet supported. You may submit an idea via https://ideas.powerbi.com/forums/265200-power-bi.
- j_wHelper IV
v-chuncz-msft thanks for the suggestion, have created an idea:
- adlehFrequent Visitor
is there a solution to this yet? I am having the same issue.
- ChippleRegular Visitor
There is a way... but you aint gonna like it.
If you've report is saved in the .pbip format, there is a report.json file that contains alot of metadata about your report. Conversely, you can also fiddle with it in order bypass some quirks such as the drilldown order. By default, the drilldown order is determined by the order you create pages in as they are sequentially added to the pods array in the report.json file.
Here is how I solved the ordering in my drilldown to be alphabetical using some simple javascript:
1. In the reports.json file, copy the pages item into your browser dev console (quick and simple javascript context)
//contents of the sections item pages = [ { "config": "{\"visibility\":0}", "displayName": "REPORT_PAGE_NAME", "displayOption": 1, "filters": "...", "height": 1080.00, "name": "1aa5971b6a505a00c014", "ordinal": 12, "visualContainers": [ ... ], "width": 1920.00 }, ... ]2. In the reports.json file, copy the pods item into your browser dev console
//contents of the pods section in reports.json pods = [ { "boundSection": "b7242e0d2995d6d87cea", "config": "{\"acceptsFilterContext\":1}", "name": "c40213975ca4343c2258", "referenceScope": 1 }, ... ]3. Add the display name field to the respective pods and sort them
pods = pods.map((pod) => { const page = pages.find(p => p.name == pod.boundSection) pod.displayName = page ? page.displayName : null; return pod; }).sort((a, b) => { return a.displayName.localeCompare(b.displayName) })4. Copy the contents of the pods variable back into the pods item in report.json and viola. Done.
Alternatively, if you want custom ordering, then I'd suggest mapping the displayName to the pod anyway and then manually arranging in the reports.json file.