Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello, I have an embedded solution where I am adding filters an slicers programatically by using the powerbi-client and power-bi-report-authoring javascript packages. I'm doing this to an embedded report in View mode. I am adding slicers by calling page.createVisual("slicer", { ... layout ... }). That is working correctly to add the slicer, but what I need help with is that those slicers appear in List mode, but I need to change them to view mode.
I can't seem to find a property to change or a mechanism to do so. I found another post in the community where people were trying to do that via a custom theme, but it sounds like that doesn't work either (https://community.powerbi.com/t5/Desktop/PowerBI-JSON-Theme-Slicer-Default-Mode-to-Dropdown/m-p/8278....
Can you help me understand how to programatically set slicer mode to Dropdown in an embedded report?
Are you able to find the solution at the end? Appreaciate that you can share it if any solution found
Hi @Anonymous ,
The easiest way is to create a slicer with a drop-down menu directly in PBI Desktop, and then embed the report into your own application.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you for the response. However, that doesn't help me in my situation. I really need to be able to create one or more slicers at runtime through the embedded solution. Adding one beforehand doesn't help me.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
8 | |
7 | |
2 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |