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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
HassanAli123
Helper I
Helper I

change the color of card on selection of bar chart which is using measure

Hi,

    i want to change the background color of card on selection of bar chart which is using measure not colum.

   i used below Dax

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

   But the issue is i have measure not colum. measure is not allowed in filter function. how can i solve it.

    i have attached a picture for your refference

     Capture.PNG

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@HassanAli123 , Take a dummy column, We can not capture the click of measure.

Create a table with single column using enter data and use that as axis

 

 

Else give button use bookmark and button

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Anonymous
Not applicable

Hi @HassanAli123 ,

 

Please create a new single-column table.

vcgaomsft_0-1645667774932.png

And put it into the axis of the bar chart.

vcgaomsft_1-1645667909840.png

Create a measure.

 

colour = IF(ISFILTERED('Table'[Column1]),"Green","Red")

 

When you click on the bar, the color of the card changes to green.

vcgaomsft_2-1645668314043.png

Attach the pbix file for reference. Hope it helps.

 

Best Regards,
Community Support Team_Gao


If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @HassanAli123 ,

 

Please create a new single-column table.

vcgaomsft_0-1645667774932.png

And put it into the axis of the bar chart.

vcgaomsft_1-1645667909840.png

Create a measure.

 

colour = IF(ISFILTERED('Table'[Column1]),"Green","Red")

 

When you click on the bar, the color of the card changes to green.

vcgaomsft_2-1645668314043.png

Attach the pbix file for reference. Hope it helps.

 

Best Regards,
Community Support Team_Gao


If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

amitchandak
Super User
Super User

@HassanAli123 , Take a dummy column, We can not capture the click of measure.

Create a table with single column using enter data and use that as axis

 

 

Else give button use bookmark and button

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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