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
jcu
Frequent Visitor

How to specify 'ransparent' as a color in conditional fill Color on Button

Using Button with conditional formatting works very nicely most of the time,

 

BUT:

 

When I try to specify 'transparent' in the name of the color for background on an icon using a variable for conditional fill color, I get an error.

 

According to:

https://docs.microsoft.com/da-dk/power-bi/create-reports/desktop-conditional-table-formatting#color-...

Color by color values

If you have a field or measure with color name or hex value data, you can use conditional formatting to automatically apply those colors to a column's background or font color. You can also use custom logic to apply colors to the font or background.

The field can use any color values listed in the CSS color spec at https://www.w3.org/TR/css-color-3/. These color values can include:

  • 3, 6 or 8-digit hex codes, for example #3E4AFF. Make sure you include the # symbol at the start of the code.
  • RGB or RGBA values, like RGBA(234, 234, 234, 0.5).
  • HSL or HSLA values, like HSLA(123, 75%, 75%, 0.5).
  • Color names, such as Green, SkyBlue, or PeachPuff.

 

I would have expected transparent to work according to the css-colo-3 document:

 

4.2.3. transparent’ color keyword

CSS1 introduced the ‘transparent’ value for the background-color property. CSS2 allowed border-color to also accept the ‘transparent’ value. The Open eBook(tm) Publication Structure 1.0.1 [OEB101] extended the ‘color’ property to also accept the ‘transparent’ keyword. CSS3 extends the color value to include the ‘transparent’ keyword to allow its use with all properties that accept a <color> value. This simplifies the definition of those properties in CSS3.

transparent Fully transparent. This keyword can be considered a shorthand for transparent black, rgba(0,0,0,0), which is its computed value.

Maybe I joust need to specify the value in another way, '#800000' and 'red' both works.

 

/ Jens Chr

1 ACCEPTED SOLUTION

Using a measure like this is giving me an error also and telling me to send out a report.

 

With my previous experience when I sendon out the report I got a response from microsoft pretty quickly.

 

However if you take out the transparent part from the measure and use the transparency of the button fill the error goes away, in this case you can use the full colour with the measure and set the button fill transparency on the options.

 

Again just streching out the possibilities and trying to give alternatives, some may not work in some context but it's a trial and error.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

15 REPLIES 15

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.