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

Join 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.

Reply
Anonymous
Not applicable

Create slicer visual as Dropdown mode in embedded report

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?

3 REPLIES 3
VincentLai
Frequent Visitor

Are you able to find the solution at the end? Appreaciate that you can share it if any solution found

v-lionel-msft
Community Support
Community Support

Hi @Anonymous ,

 

v-lionel-msft_0-1618278190473.png

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.

 

Anonymous
Not applicable

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.

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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