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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Conditional painting of a single cell

I have the following issue. I have a table in a report in which I wish to paint specific cells (in any color, that's not important). The issue is that those cells have to meet a certain criteria, in this case, they have to be catalogued as a priority. In order to do that, I have a different table in which I have saved the location, the Id and the name of the column I want to have painted, so that it can paint the correct element and only on the appropiate column. The problem comes when I try to have only specific columns painted and not all of them. I'm using this measure:

Result =
VAR ComparingLocation =
    SELECTEDVALUE('EB_DCI'[SITE]) = SELECTEDVALUE('Priority'[SITE])
VAR ComparingId =
    SELECTEDVALUE('EB_DCI'[ID]) = SELECTEDVALUE('Priority'[ID])
VAR ComparingValue =
    SELECTEDVALUE('EB_DCI'[Criteria]) = SELECTEDVALUE('Priority'[Value])
RETURN
    IF((ComparingLocation && ComparingId) && (ComparingValue), "#ffff00", "No priority")
 
So if I select any row in which the location, the id and the criteria match, it would be painted. I want it to be as dynamic and malleable as possible, but I can't figure out a way for it to work.
1 ACCEPTED SOLUTION

9 REPLIES 9
lbendlin
Super User
Super User

Duplicate the measure, and instead of mixing values and colors, use one measure for the values and the other for the colors. The color measure can return BLANK for "all other cells" which would then allow the visual to define the actual color for those (banded for example)

Anonymous
Not applicable

Thanks for your response, but I fail to understand what you mean. How am I mixing values and colors? And I don't know how to return BLANK for the other cells. I'm sorry, I'm pretty new to all of this.

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Anonymous
Not applicable

EB_DCI:

SiteIDColorTypeAvailable
LondonCD-012RedFastTrue
LondonCD-013RedSlowTrue
TokyoCD-012BlueSlowFalse
LimaCD-015GreenFastTrue
CairoCD-015BlueSlowTrue

Priority:

SiteIDColumn
LondonCD-012Color
TokyoCD-012Type
CairoCD-015Color

 

Desired outcome:

SiteIDColorTypeAvailable
LondonCD-012RedFastTrue
LondonCD-013RedSlowTrue
TokyoCD-012BlueSlowFalse
LimaCD-015GreenFastTrue
CairoCD-015BlueSlowTrue

 

(instead of changing the text color, I'd like to change the cell color but I don't know how to do that in here) Is this information enough?

lbendlin_0-1727812867303.png

 

 

Anonymous
Not applicable

Thank you.

Does this mean I would need a different measure for each column I'd like to paint?

No, you use the same measure. It needs to cover all scenarios.

Anonymous
Not applicable

But don't you need each measure to have the name of the column it is working on? If not, then why did you create C_Color and C_Type?

Right, sorry - I thought you had a matrix visual.

 

You are correct, separate measure per column.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors