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
HassanAli123
Helper I
Helper I

Change background color of card on pressing stacked bar chart

Hi,

     you can see i have 4 cards and every card has stacked bar char on it but not visible. i dragged one bar chart for your reference from open card. i want to change card background color while pressing on bar chart and when again i click on it, it should be default color. just on pressing not for any specific condition.

 

    Capture.PNG

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hi @HassanAli123 ,

Not quite understand your requirement, when you click on different stack bar chart, the four card visuals below will show different colors respectively? Is the one circled in red in the screenshot below the stack bar chart or the slicer?

yingyinr_0-1645434656350.png

If possible, could you provide a simplified pbix file (with sensitive information removed) with the scenarios and the results you expect. Thank you.

In addition, please review the following blog. Hope it can help you.

How to add an Indicator to Power BI Desktop

Best Regards

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

@HassanAli123 , if you press and isfiltered can work for the column used in bar

 

you can create a color measure and use that background color ->fx (advance) -> field value

 

if(isfiltered(Table[Column]) , "Green", "Blue")

 

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

Thanks for your response. but in my case i have measure which i want to pass as a argument in isfilter function which is the restriction. would you please suggest me another solution through which we can change the color of card visual on selection of measure

 

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.