Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I'd like to persist the scroll position of my visual. However, when I call persistProperties, I get called back with an update and therefore reload my data, which isn't practical. Any way to keep this from happening or some other way to persist the information?
1. Tried doing it on destroy(), but that doesn't seem to get called.
2. Can't use localstorage because I can't get the visual certified.
3. Maybe some way to recognize that the data hasn't changed? I may resort to a checksum if no better way.
Thanks.
-jpr
Thanks, Daniel. The update type comes back as data, so no joy on that one.
Doing a hash on the matrix part of the dataview is doing the trick for now.
Appreciate your thoughts and your source code.
-jpr
Hi @jprdynamicapps,
If you want to use persistProperties, you can't avoid an update being called, as the properties need to be re-enumerated. However, you can check options.type in your update method to determine the kind of operation being carried out and route your logic accordingly.
If it's VisualUpdateType.All or VisualUpdateType.Data, then this indicates the dataView should be re-checked. Otherwise, you should be able to leave it unprocessed. Here's an example of how you might handle this using one of my visuals, if you want to take a look.
It's been a while since I've looked at this in detail, but IIRC manually changing a property in the pane will definitely flag a change in a visual's dataView, but persistProperties might not. If it does, then your idea of a checksum may be how to proceed for subsequent updates, if/when they fire.
Hopefully this provides you with some ideas. Good luck!
Daniel
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!