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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Zubair_Muhammad
Community Champion
Community Champion

Check if a sort event was triggered

Hi,

 

I want to check if a sort event was triggered. i.e. one of these options (in the image below) was selected by user.

The closest I reached was to find VisualUpdateOptions.type.  
Can you point me to right direction?
 
Data = 2,
Resize = 4,
ViewMode = 8,
Style = 16,
ResizeEnd = 32,
All = 62,

 

sortevent.png

1 ACCEPTED SOLUTION
dm-p
Super User
Super User

Hi @Zubair_Muhammad

Yes, VisualUpdateOptions.type is all you can use here.

There is no explicit event for sorting as a sort will trigger a re-query against the data model. As far as the visual is concerned, this is an update of all data, so will typically trigger an enum value of 2 (Data).

Note that if you implement sorting using the custom option, and manage via the properties pane, that property change will also trigger a re-query, and therefore the same condition as above can be used to manage that situation also.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




View solution in original post

1 REPLY 1
dm-p
Super User
Super User

Hi @Zubair_Muhammad

Yes, VisualUpdateOptions.type is all you can use here.

There is no explicit event for sorting as a sort will trigger a re-query against the data model. As far as the visual is concerned, this is an update of all data, so will typically trigger an enum value of 2 (Data).

Note that if you implement sorting using the custom option, and manage via the properties pane, that property change will also trigger a re-query, and therefore the same condition as above can be used to manage that situation also.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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