cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Abraxus
Advocate I
Advocate I

JSON theme incorporating format cards using 'selector' settings?

Hi All,

 

If possible, could you please explain how to account for the 'selector' (variable) field in Power BI JSON theme files? I've been looking into formatting the new Filters using the JSON theme file, and while I'm able to account for the 'Filter pane' formatting card in the JSON theme file (for reference, the 'Filter pane' is called "outspacePane" in the JSON file), the 'Filter cards' formatting card eludes me.

 

Specifically, this one:

 

'Filter cards' menu'Filter cards' menu

I can see/account for most of the fields within the JSON file easily enough (and the card itself is called "filterCard" in the JSON), but not sure how to account for the 'selector' which is the first (variable) field within the Power BI UI. In the screenshot shown, the 'selector' chosen is 'Available'.

Within the Power BI code, it's referenced as the 'id' of a 'selector' field, and appears as such:

\"selector\":{
        \"id\":\"Available\"

 

However, all of the practical variations on this don't seem to work. Any insight anyone can offer would be much appreciated, thanks. (The same also applies to button states etc.)

 

Regards,

Abraxus.

1 ACCEPTED SOLUTION

Hi All,

 

Firstly, very sorry for the lack of reply, my message was in limbo for the longest time and when it did go through I received no notifications, and since I haven't logged in since I wasn't aware it had shown up let alone was even getting replies!!! (And yes my account is set up to send email notifications, thanks Microsoft >_>)

 

Anyhow, since I posted this Microsoft have actually released the full code (which is rare) necessary (though I can't remember if I figured out the applied part myself or not?), Anyhow, below is an example of the section you need for the 'applied' etc. settings, hopefully this helps (colours are for demo purposes only): "

 

filterCard":[{ "$id":"Available", 
"backgroundColor":{ 
"solid":{ "color":"#555555" 
} }, 
"transparency":0, 
"border":false, 
"borderColor":{ 
"solid":{ 
"color":"#777777" 
} }, 
"foregroundColor":{ 
"solid":{ 
"color":"#000000" 
} }, 
"textSize":13, 
"fontFamily": "Arial", 
"inputBoxColor":{ 
"solid":{ 
"color":"#111111" 
} } }, 
{ "$id":"Applied", 
"backgroundColor":{ 
"solid":{ 
"color":"#ffffff"
 } },
"transparency":0, 
"border":false, 
"borderColor":{ 
"solid":{ 
"color":"#b1b3b6" 
} }, 
"foregroundColor":{ 
"solid":{ 
"color":"#000000" 
} }, 
"textSize":14, 
"fontFamily": "Arial", 
"inputBoxColor":{ 
"solid":{ 
"color":"#333333" 
} } }]

P.S. Colours are obviously to be replaced, also apologies for the horrible formatting, my code is usually much neater than that!

View solution in original post

8 REPLIES 8
dubcentral
Frequent Visitor

Did you ever find an answer to this?

 

I would love to be able to set in my theme the default color of any applied filter.

This code was all provided in the Power BI Desktop May 2019 Feature Summary blog post. Everything that I've tried works great except for the background color for the Applied cards. If you figure that out let me know. Smiley Happy

Thanks Scott, I will give that a try at some point today. It's the applied cards that I'm after so here's hoping it works.

Good luck. I've tried it, but I can't get the background color on Applied to change. If you figure that out please let me know.

Sorry forgot to reply directly, please see post above if you're still trying to figure this out like I was, thanks!

Hi All,

 

Firstly, very sorry for the lack of reply, my message was in limbo for the longest time and when it did go through I received no notifications, and since I haven't logged in since I wasn't aware it had shown up let alone was even getting replies!!! (And yes my account is set up to send email notifications, thanks Microsoft >_>)

 

Anyhow, since I posted this Microsoft have actually released the full code (which is rare) necessary (though I can't remember if I figured out the applied part myself or not?), Anyhow, below is an example of the section you need for the 'applied' etc. settings, hopefully this helps (colours are for demo purposes only): "

 

filterCard":[{ "$id":"Available", 
"backgroundColor":{ 
"solid":{ "color":"#555555" 
} }, 
"transparency":0, 
"border":false, 
"borderColor":{ 
"solid":{ 
"color":"#777777" 
} }, 
"foregroundColor":{ 
"solid":{ 
"color":"#000000" 
} }, 
"textSize":13, 
"fontFamily": "Arial", 
"inputBoxColor":{ 
"solid":{ 
"color":"#111111" 
} } }, 
{ "$id":"Applied", 
"backgroundColor":{ 
"solid":{ 
"color":"#ffffff"
 } },
"transparency":0, 
"border":false, 
"borderColor":{ 
"solid":{ 
"color":"#b1b3b6" 
} }, 
"foregroundColor":{ 
"solid":{ 
"color":"#000000" 
} }, 
"textSize":14, 
"fontFamily": "Arial", 
"inputBoxColor":{ 
"solid":{ 
"color":"#333333" 
} } }]

P.S. Colours are obviously to be replaced, also apologies for the horrible formatting, my code is usually much neater than that!

View solution in original post

Scott_BI
Frequent Visitor

Abraxus,

 

Would you be willing to share the json you have created? I've been having difficulty finding the json formatting options for the pane.

 

Thank you!

Scott

v-jiascu-msft
Microsoft
Microsoft

Hi Abraxus,

 

Do you mean the report themes here? I didn't find anything there. Can you give more details, please?

 

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors