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
Anonymous
Not applicable

Different theme settings for dropdown vs list modes in slicer (JSON)

Is it possible in a JSON for custom theme to set coloured background for the selection field in a slicer in collapsed dropdown mode, and in the same time set it to be transparent when slicer is in list mode?

 

I'm creating a theme for a new customer that have a coloured canvas and where the visuals will have a white background with rounded corners and shadow effect. But the slicers will have transparent background, so I wan't to have a white background in the selection field (collapsed dropdown), but transparent background when the slicer is presented as a list. This is what I want to accomplish (collapsed dropdown in left slicer here manually defined to #FFFFFF):

And_Sil_0-1665564159510.png

However, I can only find 3 different cardNames to use when setting background colours for the slicer selection fields, except the one for setting up default:

*= Returns coloured selection field for all slicer types
numericInputStyle= Returns coloured selection field for Relative slicers
Date= Returns coloured selection field for Between, Before and After slicers
Items= Returns coloured selection field for Dropdown and List

 

So what I am looking for is a way to define the cardName "Items" separately for dropdown versus list. Because when defining background colour for Items it will apply on both dropdown and list:

And_Sil_1-1665564598393.png

 

This is the part about slicers in the theme script I have created:

 

 

	"slicer":{
		"*":{
			"background":[
			  {
				"transparency": 100
			  }
			],
			"*": [   (This is what I want to replace with a solution for all slicers except when in list mode)
			  {
				"background": { "solid": { "color": "#FFFFFF"}},
				"textSize": 10
			  }
			],
			"header": [
			  {
				"background": { "transparency": 100},
				"textSize": 12
			  }
			],
			"border":[
			  {
				"show": false
			  }
			],
			"dropShadow": [
			  {
				"show": false
			  }
            ]
		}
		
	},

 

 

 

Please note that I'm looking for a solution to use in a json for a theme template to be used widely within my customers organisation, NOT manually setting up background colours in PBIX.

3 REPLIES 3
BoredDataDude
New Member

Has anyone found a solution for this?

amitchandak
Super User
Super User

@Anonymous , Check if theme generator can help

https://powerbi.tips/tools/report-theme-generator-v3/

Anonymous
Not applicable

Thanks, but the theme generator unfortunatly only helps on a higher level. For example it helps with how to set up background colour for a slicer, but not down on different slicer types, like the cardNames  "Items", "numericInputStyle" and so on...

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.