We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello everyone,
I'm creating a custom visual and I have a question: is there a way to know what filters are applied to my visual? For example, if the data I'm visualizing is filtered from date A to date B, am I able to know that in someway? I tried console.logging the options object to see if there was anything in there, but it doesn't seem to be. Is this possible in PowerBI?
Thank you in advance
Best regards,
Luca
Hi @lucamoz
1.You can define a filter in "visualSettings", then pass the the selection into the code as a parameter.
You can refer to the following video (Jump to the 31:48 section of the video).
Microsoft Power BI: How to build a custom visual for Power BI - BRK3020 - Bing video
2.You can use getSelectedPoints() function, you can refer to the following link.
Get selected points AFTER selection - Highcharts official support forum
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much for you answer! Sorry for not specifying this before but I need to know what page level and report level filters are applied to my visual. Will your solution work? 🙂
Hi @lucamoz
You can refer to the video I offered above, it may use this.
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.