Hello. Is it possible to use conditional formatting on row headers, based on a value of another column?
I noticed you didn’t provide a PBIX file. Providing one will help users and experts find a solution to your inquiry faster and better.
A perfect initial question includes all of the following:
- A clear explanation of the problem you are experiencing
- A mockup of the results you want to achieve
- Your current work-in-progress PBIX file
- Your underlying data file (to allow us to go into Power Query if necessary to transform your data and/or data model – often DAX questions really end up being data modeling solutions)
Check out this thread on Tools and Techniques for Providing PBIX Files with Your Forum Questions
I also suggest that you check the forum guideline How To Use The Enterprise DNA Support Forum. Not adhering to it may sometimes cause delay in getting an answer.
Not completing your data may sometimes cause delay in getting an answer.
Thank you!
Thanks - it was a general question regarding the Table visual. From my searches here and on Google, this doesn’t seem to be possible.
In native Table visual currently there is no options:
Maybe in some custom or some workarounds ?
This is a bit of a workaround, place a shape over the header column you wish to “highlight”. PBIX file included at bottom of post.
I set the shapes transparency to 50% so you can see the text come through. The shape was brought to the front.
I created a basic measure which said if Returns Cost is greater than 0 then show the pink colour “#F0A787”, if not show “#FFFFFF00”…the additional zeroes at the end make the shapes colour transparent. I left the border on the shape so you can find it/see it easily but if you use this workaround you’d want to remove/turn off the border.
Add the conditional formatting measure to the conditional formatting section in the formatting of the shape.
PBIX for Rosalie.pbix (20.6 KB)
Hello and thanks for the replies. I see now why adding data helps with this forum. I am looking to conditionally format the ROW heading, not the Columns. (@DavieJoe - thanks for the tip though.)
In this example, Product 2 should be a different colour because it is not an Active product. So I want to conditionally format the product name (row heading) based on the value of the Active column. Hope that makes more sense!
(PS - this screenshot is from Excel.)
Ah sorry, my bad, you’re right. I didn’t read the problem properly.
I don’t believe there is a current way to conditionally format row headers. Potentially InfoRiver might have this functionality but it is a custom visual that you would need to pay for.
Are you using a table or a matrix? If it’s a table then you should be able to just format that column under Cell elements, as it isn’t really a header - just the first column that happens to be in your table.
PBIX Rosalie.pbix (16.5 KB)
If it’s a matrix then may have to be a custom one as @DavieJoe has mentioned. Just thought I’d check as personally got a bit confused which you mean when reading through!
@jamie.bryan - yes it is a matrix visual and ideally I don’t want to include the Active column.
Thank you all for your input.
You could include the Active column but shrink it so you can’t see it
Yes, that’s a possibility. However the matrix is a bit more complicated than the sample I shared. Thanks
Cool. Again, my apologies for posting about column headers instead of row headers, in my excitement to help I didn’t read your request properly. Sometimes, I just need to slow down
@RosalieMacartney - if the red color is supposed to based on the value “Active”, you actually don’t have to have that column on your Matrix table at all - so long as the row header can determine what the Active status is, it will work:
Active is not on the table at all, just used as a conditional format on the font color as @jamie.bryan showed above.
I’ve taken the sample from Jamie and added a value column (so that we can render a proper table), and removed the Active column - no other changes were made to that sample.
PBIX Rosalie (2).pbix (18.3 KB)
@Heather - I think that only works when it’s a simple Table visual. Changing it to a Matrix and that formatting option isn’t available for the Product 2 (row heading). Unless I missed it!
PBIX Rosalie (3-matrix).pbix (21.1 KB)
Appologies @RosalieMacartney - apparently I wasn’t fully awake when sending the earlier message.
However, I have found a work-around for you if it’s acceptable (and yes, it’s still a matrix table)
using the sample you sent me, here is what I have done
Step 1 - build a measure to return your row headers:
Header Measure =
IF( ISINSCOPE( 'Table'[Product] ),
UNICHAR(127) & SELECTEDVALUE( 'Table'[Product] ),
SELECTEDVALUE( 'Table'[Category] ))
note: the UNICHAR portion is just to add an indent to your Product lines
Step 2 - add this measure as the first value in your matrix
Step 3 - add the condition to the Header Measure value (because as a value it can accept conditional format)
Step 4 - turn off row wrapping on the row headers, and drag that column to be as thin as possible
Step 5 - rename the Category column (in the Matrix visual only) to something small like . or - so your users can overlook it
Result:
eDNA Solution - PBIX Rosalie (3-matrix).pbix (21.6 KB)
@Heather - Thank you. This works like a dream! I feel so clever now