<?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 How does sync slicers work in a custom visual? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/How-does-sync-slicers-work-in-a-custom-visual/m-p/810619#M21013</link>
    <description>&lt;P&gt;I'm trying to make sync slicers work in a custom visual.&amp;nbsp; My custom slicer supports date range selection by creating an advanced filter, and works well on a single page. According to the &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/enable-sync-slicers" target="_self"&gt;documentation&lt;/A&gt; this requires nothing but adding&amp;nbsp;&lt;EM&gt;&lt;SPAN&gt;supportsSynchronizingFilterState&lt;/SPAN&gt;&lt;/EM&gt; to the&amp;nbsp;&lt;EM&gt;capabilities.json&lt;/EM&gt; file.&amp;nbsp; This seems far too simple: when I switch pages in my report, PowerBI calls the constructor and update functions of my custom slicer afresh on each page, and I cannot find any information on the filter state passed to my visual in the options. The sync slicer checkboxes look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-09-26_17h41_47.png" style="width: 172px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/198118iF7C369E42BD3D885/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-09-26_17h41_47.png" alt="2019-09-26_17h41_47.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But the jsonFilters passed in are empty:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="No jsonFilters" style="width: 305px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/198119i1A382496E759EA4C/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-09-26_17h48_13.png" alt="No jsonFilters" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;No jsonFilters&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Where should I get the data from?&amp;nbsp; There are further &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/bookmarks-support" target="_self"&gt;documentation&lt;/A&gt; hints pointing at&amp;nbsp;&lt;EM&gt;FilterManager&lt;/EM&gt;, but this has been removed in recent versions.&lt;/P&gt;</description>
    <pubDate>Sun, 06 Oct 2019 14:49:52 GMT</pubDate>
    <dc:creator>AdrianCox</dc:creator>
    <dc:date>2019-10-06T14:49:52Z</dc:date>
    <item>
      <title>How does sync slicers work in a custom visual?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-does-sync-slicers-work-in-a-custom-visual/m-p/810619#M21013</link>
      <description>&lt;P&gt;I'm trying to make sync slicers work in a custom visual.&amp;nbsp; My custom slicer supports date range selection by creating an advanced filter, and works well on a single page. According to the &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/enable-sync-slicers" target="_self"&gt;documentation&lt;/A&gt; this requires nothing but adding&amp;nbsp;&lt;EM&gt;&lt;SPAN&gt;supportsSynchronizingFilterState&lt;/SPAN&gt;&lt;/EM&gt; to the&amp;nbsp;&lt;EM&gt;capabilities.json&lt;/EM&gt; file.&amp;nbsp; This seems far too simple: when I switch pages in my report, PowerBI calls the constructor and update functions of my custom slicer afresh on each page, and I cannot find any information on the filter state passed to my visual in the options. The sync slicer checkboxes look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-09-26_17h41_47.png" style="width: 172px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/198118iF7C369E42BD3D885/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-09-26_17h41_47.png" alt="2019-09-26_17h41_47.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But the jsonFilters passed in are empty:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="No jsonFilters" style="width: 305px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/198119i1A382496E759EA4C/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-09-26_17h48_13.png" alt="No jsonFilters" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;No jsonFilters&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Where should I get the data from?&amp;nbsp; There are further &lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/visuals/bookmarks-support" target="_self"&gt;documentation&lt;/A&gt; hints pointing at&amp;nbsp;&lt;EM&gt;FilterManager&lt;/EM&gt;, but this has been removed in recent versions.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Oct 2019 14:49:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-does-sync-slicers-work-in-a-custom-visual/m-p/810619#M21013</guid>
      <dc:creator>AdrianCox</dc:creator>
      <dc:date>2019-10-06T14:49:52Z</dc:date>
    </item>
    <item>
      <title>Re: How does sync slicers work in a custom visual?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/How-does-sync-slicers-work-in-a-custom-visual/m-p/811687#M21021</link>
      <description>&lt;P&gt;Further details: the example timeline slicer on Github does work. It's a good deal more complex than my slicer, and I can't currently spot what difference might be significant.&amp;nbsp; To make things even more bizarre, occasionally there is data in the jsonFilter field. Here's my full &lt;EM&gt;capabilities.json&lt;/EM&gt;:&lt;/P&gt;&lt;PRE&gt;{
    "dataRoles": [
        {
            "displayName": "Date Range",
            "name": "category",
            "kind": "Grouping"
        }
    ],
    "objects": {
        "general": {
            "displayName": "General",
            "properties": {
                "selected": {
                    "type": {
                        "bool": true
                    }
                },
        "filter": {
            "type": {
                "filter": true
            }
        }
    }}
    },
    "dataViewMappings": [
        {
            "conditions": [
                {
                    "Category": {
                        "max": 1
                    }
                }
            ],
            "categorical": {
                "categories": {
                    "for": {
                        "in": "category"
                    },
                    "dataReductionAlgorithm": {
                        "top": {}
                    }
                }
            }
        }
    ],
    "suppressDefaultTitle": true,
    "supportsHighlight": true,
    "supportsSynchronizingFilterState": true
}&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Oct 2019 21:01:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/How-does-sync-slicers-work-in-a-custom-visual/m-p/811687#M21021</guid>
      <dc:creator>AdrianCox</dc:creator>
      <dc:date>2019-10-07T21:01:12Z</dc:date>
    </item>
  </channel>
</rss>

