cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
VosInnieBos
Frequent Visitor

Transparent code #FFFFFF00 in Dax results in "Error occurred while rendering the report"

Hi all 

 

I am hoping someone can help me. 

Im trying to use a DAX formula to return either Transparent (#FFFFFF00) or a color.

Then I use this DAX to conditionally fill a button. 

 

However when I use the 8 digit Hex code I get an error rendering the report.

When I use a 6 digit Hex code it works, but Im unable to make the button transparent.  

 

I used this video to get me to this point: (3) Making (some) things transparent in Power BI - YouTube

Any help will be greatly appreciated!

 

My formula is: 

VosInnieBos_1-1618332498787.png

 

 My Error:
VosInnieBos_0-1618332434101.png

 

1 ACCEPTED SOLUTION
Watsky
Solution Sage
Solution Sage

Hey @VosInnieBos, it appears to be an issue only with Fill. What about turning off Fill and adding your measure to the background color?

 


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up! ?
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

View solution in original post

3 REPLIES 3
nohowUp_fnDown
Advocate I
Advocate I

I know this thread is a year old, but I came across an alternative. Specifying an empty string "" worked very well for me. I'm setting the fill color in a matrix/pivot table. This allowed for the built in row shading to work properly.

Capture.JPG

 

 

See the last ELSE value in the code. I'm also switching a color scheme based on a slicer.

 

StarColor2 = IF(AND(AND(qryPhysSummary[msrStars]>0.0, qryPhysSummary[msrStars]<=7.0),NOT(ISBLANK(qryPhysSummary[msrStars]))), 
    (
    IF(AND(qryPhysSummary[msrStars]>0,qryPhysSummary[msrStars]<2.0),SWITCH(SELECTEDVALUE(tblColorSelection[colorTheme]),"Normal","#CC3332","Alternate1","#DB4325","Alternate2","#CC3332"),
        IF(qryPhysSummary[msrStars]<3.0,SWITCH(SELECTEDVALUE(tblColorSelection[colorTheme]),"Normal","#D9792A","Alternate1","#EDA247","Alternate2","#F4A582"),
            IF(qryPhysSummary[msrStars]<4.0,SWITCH(SELECTEDVALUE(tblColorSelection[colorTheme]),"Normal","#E7B422","Alternate1","#E6E1BC","Alternate2","#F7F7F7"), 
                IF(qryPhysSummary[msrStars]<5.0,SWITCH(SELECTEDVALUE(tblColorSelection[colorTheme]),"Normal","#99C134","Alternate1","#45C4AD","Alternate2","#92C5DE"),                      SWITCH(SELECTEDVALUE(tblColorSelection[colorTheme]),"Normal","#147F3F","Alternate1","#006164","Alternate2","#0571B0")
                )
            )
        )
    )
    ),"")

 

 Se 

Watsky
Solution Sage
Solution Sage

Hey @VosInnieBos, it appears to be an issue only with Fill. What about turning off Fill and adding your measure to the background color?

 


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up! ?
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.


Did my answer(s) help you? Give it a kudos by clicking the Thumbs Up!
Did my post answer your question(s)? Mark my post as a solution. This will help others find the solution.

Proud to be a Super User!

Thank you! That worked!

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors