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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
gilmore_staci
Helper II
Helper II

Card border conditional formatting

I see a lot of posts about changing the background and text color based on a condition but can the border be changed on a Card visual based on a condition?

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @gilmore_staci ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1679364116097.png

Average Measure = AVERAGE('Table'[Value])

Border Color = IF([Average Measure]>=90&&[Average Measure]<=100,"Green","Red")

Please try:

Format style-> Field value ->What field should we based on?-> [Border Color]

vjianbolimsft_1-1679364219918.png

Final output:

vjianbolimsft_2-1679364342913.png

vjianbolimsft_4-1679364394359.png

Best Regards,

Jianbo Li

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

View solution in original post

3 REPLIES 3
v-jianboli-msft
Community Support
Community Support

Hi @gilmore_staci ,

 

Based on your description, I have created a simple sample:

vjianbolimsft_0-1679364116097.png

Average Measure = AVERAGE('Table'[Value])

Border Color = IF([Average Measure]>=90&&[Average Measure]<=100,"Green","Red")

Please try:

Format style-> Field value ->What field should we based on?-> [Border Color]

vjianbolimsft_1-1679364219918.png

Final output:

vjianbolimsft_2-1679364342913.png

vjianbolimsft_4-1679364394359.png

Best Regards,

Jianbo Li

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

gilmore_staci
Helper II
Helper II

@v-jianboli-msft 

I am coloring an average so its not a column.  I created the measure and tried to add it to the format but the field doesn't stay in the box, it blanks our so I'm guessing because its a measure and not a column.

I did try using the fx button and use a rule for the average field but its not working either.  

I have >= 0 and < 89  - red

> 90 and < 100 - green

But its coloring a 93% average red, should be green

 

Any ideas?

v-jianboli-msft
Community Support
Community Support

Hi @gilmore_staci ,

 

You can change the card border here:

vjianbolimsft_0-1679276975562.png

Card border conditional formattinng just like normal conditional formatting, here is a simple example:

border color = IF(SUM('Table'[Column1])<=1,"Red","Green")

vjianbolimsft_2-1679277137918.png

Final output:

vjianbolimsft_3-1679277155724.png

vjianbolimsft_4-1679277180708.png

Best Regards,

Jianbo Li

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.