Forum Discussion

KKalyaNB's avatar
KKalyaNB
New Member
2 years ago
Solved

How to highlight the different columns based on a column that has list of columns using power bi?

Hello All,   I'm trying to complete one enhancement request for the current report. We are currently having a table visual with some 50 columns in it, there is a column called CheckFailed, that col...
  • kpost's avatar
    2 years ago

    You'll need to create a custom format measure for each column.

     

    Here's one for LINE_DESC column.

     

    LINE_DESC_FORMAT =
    var rowname = SELECTEDVALUE('Table'[VIEWNAMECheckFailed])
    RETURN
    IF(CONTAINSSTRING(rowname, "LINE_DESC"), 1, 0)

     

     

    then you'll format that column using conditional formatting on the font or background.  (In the example you posted, you made the font red but you said background.  So just select whichever one you meant).

     

     
    And then use rules-based conditional formatting with that measure.  If the measure you created = 1, then the font should be red
     

     And here's the result:

     


     

    You'll need to make a measure like this for each column.

     

    See attached .pbix file for implemented solution.