Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ChrisWilliams
Advocate II
Advocate II

Power BI custom visuals - custom sort

This page (https://github.com/Microsoft/PowerBI-visuals/blob/master/Capabilities/Sorting.md) describes how to implement sorting when creating custom visualizations.  I'm interested in custom sorting, but the documentation is extremely sparse.

 

What I'd like to do is hang several custom menu options in the system sort menu (Sort by this, Sort by that, etc.) and then get a notification when a user chooses a specific sort menu option.  I'm doing this because my visual is populated by passing in a json collection of properties and then I'm building a custom display.  I'd love to allow users to sort using a menu option in addition to whatever sort UI I can expose.

 

Are there some additional docs or sample code on the custom sort option?

1 REPLY 1
v-viig
Community Champion
Community Champion

Hello @ChrisWilliams

 

You should specify the default sorting at capabilities object as described in the documentation.

Power BI calls the update method of your visual once sorting is changed by user.

 

Ignat Vilesov,

Software Engineer

 

Microsoft Power BI Custom Visuals

pbicvsupport@microsoft.com

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.