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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
AdrianCox
Regular Visitor

How does sync slicers work in a custom visual?

I'm trying to make sync slicers work in a custom visual.  My custom slicer supports date range selection by creating an advanced filter, and works well on a single page. According to the documentation this requires nothing but adding supportsSynchronizingFilterState to the capabilities.json file.  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:

 2019-09-26_17h41_47.png

But the jsonFilters passed in are empty:

No jsonFiltersNo jsonFilters

Where should I get the data from?  There are further documentation hints pointing at FilterManager, but this has been removed in recent versions.

1 REPLY 1
AdrianCox
Regular Visitor

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.  To make things even more bizarre, occasionally there is data in the jsonFilter field. Here's my full capabilities.json:

{
    "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
}

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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