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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
GregBoet
Regular Visitor

Error "slicerSerializationFailed" when calling getSlicerState()

I’m embedding a Power BI report in a web application, and I am generally able to use Javascript to read the user-selected values in the report’s slicers.

 

In Javascript, I am simply calling

state = await slicer.getSlicerState();

 

This works for most slicers, but one of our slicers allows the user to choose one or more values from a hierarchical tree (screenshots below). This sometimes works and sometimes does not, depending on what the user chooses. Scenarios 1 and 2 below work, but Scenario 3 throws an error (details below).

 

The error message I’m getting back makes this sound like a bug rather than simply an omitted feature. Is this a bug that will be fixed? Is there a workaround?

 

1.

If the user selects a single checkbox at the parent level, I can use Javascript to get the following slicer state filter. Everything is good.

{"$schema":"http://powerbi.com/product/schema#basic","target":{"table":"clm Locations","column":"Level"},"filterType":1,"operator":"In","values":["3"],"requireSingleSelection":false}

GregBoet_0-1715626564925.png

 

 

2.

If the user selects a single checkbox at the child level, I can use Javascript to get the following slicer state filter. Everything is good.

{"$schema":"http://powerbi.com/product/schema#tuple","target":[{"table":"clm Locations","column":"Level"},{"table":"clm Locations","column":"LocationName"}],"filterType":6,"operator":"In","values":[[{"value":"3"},{"value":"CEMETERY-341"}]]}

CarsonCityLocationScenario02.png

 

3.

If the user selects all but one or two values at the child level, calling Javascript to get the slicer state throws an exception.

Exception thrown is as follows:

{message: 'slicerSerializationFailed', detailedMessage: 'Failed to serialize slicer filters to json object', level: 3}

GregBoet_2-1715626564928.png

 

2 REPLIES 2
GregBoet
Regular Visitor

Although this answer does help, I am not sure that the documentation says that this functionality is not supported. On the contrary, it says that hierarchy slicers are supported, yet this is not working. Is there a place where I can report this as a bug to be fixed?

v-yiruan-msft
Community Support
Community Support

Hi @GregBoet ,

Base on your description, it seems like you got the error when chose one or multiple values at the child level. Please check if hit any following limitation:

Use slicers when embedding a report in Power BI embedded analytics | Microsoft Learn

vyiruanmsft_0-1715675696170.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors