<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error &amp;quot;slicerSerializationFailed&amp;quot; when calling getSlicerState() in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Error-quot-slicerSerializationFailed-quot-when-calling/m-p/3916507#M52429</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/617421"&gt;@GregBoet&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/control-report-slicers#considerations-and-limitations" target="_self"&gt;Use slicers when embedding a report in Power BI embedded analytics | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyiruanmsft_0-1715675696170.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1097707i9532FB4A5A82A7B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyiruanmsft_0-1715675696170.png" alt="vyiruanmsft_0-1715675696170.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Tue, 14 May 2024 08:35:13 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-05-14T08:35:13Z</dc:date>
    <item>
      <title>Error "slicerSerializationFailed" when calling getSlicerState()</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Error-quot-slicerSerializationFailed-quot-when-calling/m-p/3914872#M52405</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Javascript, I am simply calling&lt;/P&gt;&lt;P&gt;state = await slicer.getSlicerState();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;{"$schema":"&lt;A href="http://powerbi.com/product/schema#basic" target="_blank"&gt;http://powerbi.com/product/schema#basic&lt;/A&gt;","target":{"table":"clm Locations","column":"Level"},"filterType":1,"operator":"In","values":["3"],"requireSingleSelection":false}&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GregBoet_0-1715626564925.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1097263i63ED76D650B438AC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregBoet_0-1715626564925.png" alt="GregBoet_0-1715626564925.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;{"$schema":"&lt;A href="http://powerbi.com/product/schema#tuple" target="_blank"&gt;http://powerbi.com/product/schema#tuple&lt;/A&gt;","target":[{"table":"clm Locations","column":"Level"},{"table":"clm Locations","column":"LocationName"}],"filterType":6,"operator":"In","values":[[{"value":"3"},{"value":"CEMETERY-341"}]]}&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CarsonCityLocationScenario02.png" style="width: 219px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1097268i18AC64B2CB1011C8/image-size/large?v=v2&amp;amp;px=999" role="button" title="CarsonCityLocationScenario02.png" alt="CarsonCityLocationScenario02.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.&lt;/P&gt;&lt;P&gt;If the user selects all but one or two values at the child level, calling Javascript to get the slicer state throws an exception.&lt;/P&gt;&lt;P&gt;Exception thrown is as follows:&lt;/P&gt;&lt;P&gt;{message: 'slicerSerializationFailed', detailedMessage: 'Failed to serialize slicer filters to json object', level: 3}&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GregBoet_2-1715626564928.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1097264i3D36B86B2F1EFC9B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GregBoet_2-1715626564928.png" alt="GregBoet_2-1715626564928.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 18:59:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Error-quot-slicerSerializationFailed-quot-when-calling/m-p/3914872#M52405</guid>
      <dc:creator>GregBoet</dc:creator>
      <dc:date>2024-05-13T18:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: Error "slicerSerializationFailed" when calling getSlicerState()</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Error-quot-slicerSerializationFailed-quot-when-calling/m-p/3916507#M52429</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/617421"&gt;@GregBoet&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/javascript/api/overview/powerbi/control-report-slicers#considerations-and-limitations" target="_self"&gt;Use slicers when embedding a report in Power BI embedded analytics | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="vyiruanmsft_0-1715675696170.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1097707i9532FB4A5A82A7B4/image-size/large?v=v2&amp;amp;px=999" role="button" title="vyiruanmsft_0-1715675696170.png" alt="vyiruanmsft_0-1715675696170.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 08:35:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Error-quot-slicerSerializationFailed-quot-when-calling/m-p/3916507#M52429</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-14T08:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Error "slicerSerializationFailed" when calling getSlicerState()</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Error-quot-slicerSerializationFailed-quot-when-calling/m-p/3917051#M52448</link>
      <description>&lt;P&gt;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?&lt;/P&gt;</description>
      <pubDate>Tue, 14 May 2024 10:56:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Error-quot-slicerSerializationFailed-quot-when-calling/m-p/3917051#M52448</guid>
      <dc:creator>GregBoet</dc:creator>
      <dc:date>2024-05-14T10:56:25Z</dc:date>
    </item>
  </channel>
</rss>

