Forum Discussion

Asuna's avatar
Asuna
Frequent Visitor
2 years ago

Adding a column with blanks invalidates earlier conditional formatting?

Hello, sorry if this is a silly question, but I am having an issue where when I add a column to a table that has earlier conditional formatting it removes that earlier conditional formatting, is there any way to make this conditional formatting stay when the third column is empty?

Example:

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi,  Asuna

    Power BI may recalculate the format of the table when adding new columns.

    Before adding a new column, you can use the bookmark feature to save the status of the current report page, including conditional formatting. Avoid losing conditional formatting after adding a new column. If conditional formatting is lost, you can restore the previous state with a bookmark.

    You can try using a calculated column to make sure it doesn't affect the conditional formatting you already have. If the conditional formatting is set based on the results of the calculation, then the calculation should be stable.

    Alternatively, you can use DAX expressions to specify formatting rules when setting up conditional formatting, so that even if the table structure changes, the conditional formatting will remain unchanged as long as the DAX is valid.

    You can use matrice visual, which only need to add a conditional formatting

     

     

    How to Get Your Question Answered Quickly 

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

    Best Regards

    Yongkang Hua

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    • TrainBI's avatar
      TrainBI
      Frequent Visitor

      Anonymous I am having a similar problem, but I am already using a calculated column to set the conditional formatting for cell color. I also am using the Web URL conditional formatting in the Cell Elements formatting option, and that formatting disappears when the new column has a blank value for that row. 

      Additionally, when I remove the  new column, the conditional formatting reappears.