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.

Suggestion: Dynamic Coloring of Card Visuals Based on Slicer Selections

Dear Microsoft Power BI Team,

 

I'd like to suggest a feature for Power BI that would enhance its interactivity and user experience. It would be great if we could have an option to dynamically color Card visuals based on selections made in Slicers.

 

Specifically, I envision a functionality where selecting an item in a slicer highlights or changes the color of a corresponding Card visual. When the item is deselected in the slicer, the Card visual would then return to its default color. This would provide an immediate, visual indicator of the slicer selection, which could greatly enhance the understanding and readability of our dashboards.

 

Having this functionality would be particularly useful in scenarios where multiple Cards are present on the dashboard, and we want to direct the viewer's attention to specific Cards based on slicer selections.

 

Thank you for considering this suggestion. I believe this feature would greatly benefit all users and help create more interactive, dynamic, and user-friendly reports.

 

Best Regards,
Reggie Jardin Comendador

Status: New
Comments
nkarig
New Member

This can actually be achieved already. If you create a measure such as the following:

// This measure checks if Sales[Product] is filtered by a slicer or the sidebar filter
Product Filter Check =
VAR Filtered = ISFILTERED(Sales[Product])
VAR OneValue = HASONEVALUE(Sales[Product])
RETURN
IF(Filtered || OneValue, "Yes", "No")

You can go into your card's 'Visualizations' sidebar on the right to the 'General' section under 'Effects' to 'Background' and click the fx for 'Color'. If you go to Rules and set the field to the measure you just made 'Product Filter Check', you can have it be one color when 'Yes' and another when 'No'.

As for if you want specific colors based on specific selections in your slicer, it will take a little more work but would make the measure look more like the following:

Product A Selected =
IF(
HASONEVALUE(Sales[Product]) && VALUES(Sales[Product]) = "Product A",
"A",
"!A"
)