Forum Discussion

bjnodello's avatar
bjnodello
Helper II
9 years ago
Solved

Conditional Formatting with Blank Values

Hello All,

 

Does anyone have and tips/tricks for dealing with blank values and conditional formatting?  It appears to be treating the entry as "0" and I would like it to be ignored.  

 

Thanks,

 

Brett

  • Thanks v-yulgu-msft and SwaroopRoyM,

     

    I may not have been clear what I was asking.  Here are the settings I have for a set of table values in Power BI Desktop:

     

    Note, in the screenshot below the blank value is shaded the same as the 0.  I would like the blank values to be ignored.  I am not aware of a way to use an IF statement to conditionally format in Power BI Desktop.  Is this really possible? If so can you provide additional details please?

     

     

    Thanks,

     

    Brett

8 Replies

  • Thanks v-yulgu-msft and SwaroopRoyM,

     

    I may not have been clear what I was asking.  Here are the settings I have for a set of table values in Power BI Desktop:

     

    Note, in the screenshot below the blank value is shaded the same as the 0.  I would like the blank values to be ignored.  I am not aware of a way to use an IF statement to conditionally format in Power BI Desktop.  Is this really possible? If so can you provide additional details please?

     

     

    Thanks,

     

    Brett

    • SwaroopRoyM's avatar
      SwaroopRoyM
      Helper II

      Hello Brett,

       

      If you don't want to see the "blank" value in the visual, you can do that by having this column as visual level filter. Once you have this column as visual level filter, go to "advanced filtering" option and choose "is not blank" option.

       

      Hope this answers your query.

       

      Thanks,

      Swaroop

    • Sean's avatar
      Sean
      Community Champion

      Uncheck "Show items with no data" like this...

       

  • Hi, You can use IF condition to look for "blank" and do the necessary formatting. Thanks, Swaroop
  • v-yulgu-msft's avatar
    v-yulgu-msft
    Microsoft Employee

    Hi bjnodello,

     

    In your scenario, what data source did you use to import to PowerBI desktop? In my test, I didn't get "0" value when I import blank values. Would you please provide some sample data so that we can reproduce your issue and give you more advice? 

     

    Thanks,
    Yuliana Gu

  • Thank you SwaroopRoyM and Sean.  This is one of many measures in the table so unfortunately, hiding blanks won't work as the other measures will not be blank.

  • YukiK's avatar
    YukiK
    Impactful Individual

    You can definitely work this out by assigning values to blank values like others are suggesting, but you can also set a specific color as default formatting for conditional formattings, which worked my for case where I wanted blank as the same color as zero.