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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
spham1215
Frequent Visitor

New Slicer Type Formatting for JSON

Hello all,

 

My understanding is that JSON theme file values are [mostly?] only able to modify settings that appear in the formatting pane for visuals. With the new December update, the Slicer Option > Style has been relocated to this formatting pane. 

 

Has anyone figured out how to set the Slicer Style to "Dropdown" in a custom JSON theme file yet?

4 REPLIES 4
dm-p
Super User
Super User

Hi @spham1215,

The info I've received is that the property is data > mode, but it still looks like this has the same bug you've observed and that the property has to be reset to default to apply correctly 😞

The following syntax may be useful for later if/when it's fixed and is supposed to be the correct selector to use when setting up a theme:

 

{
    "name": "My Theme",
    "visualStyles": {
        "slicer": {
            "*": {
                "data": [
                    {
                        "mode": "Between"
                    }
                ]
            }
        }
    }
}

 

Valid values for mode are:

  • "VerticalList"
  • "HorizontalList"
  • "Between"
  • "Before"
  • "After"
  • "Basic"
  • "Dropdown" (so, this is what you should need for your case)
  • "Relative"
  • "Single"
  • "RelativeTime"

I hear that if the type you specify is not compatible with the field type, it will typically force it to one that does.

Regards,

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




andy808
Helper II
Helper II

Hey there, were you able to figure out the JSON code to set "dropdown" for the slicer? Having the same issue.

Thanks!

It seems the below code "works," but there's a bug that requires you to click "Reset to Default" in the slicer pane for the JSON theme setting to kick in:

 

"slicer":{
	"*":{
		"options": [{
			"style": "Dropdown"
		}],

 

Just waiting for the bug fix I guess..

VishalJhaveri
Resolver III
Resolver III

I guess currently no such property has been launced to configure this requirement, lately.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors