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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.