Forum Discussion

Shahin's avatar
Shahin
Frequent Visitor
6 years ago
Solved

Conditional formatting not working for single row .

Hi Community,

 

Does any body know why the conditional formating not working when you have only one row in your table?  Appricate your responce.

 

Regards,

Shahin

  • Hi,

     

    According to your description, I think that any table which doesn't have a grouping displayed as a single row doesn't support conditional formatting.

    Reference:

    https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#considerations-and-limitations

     

    And I have a workaround for your problem, so I create a table to test:

    please take following steps:

    1)Create a measure to minus [Actual] and Budget:

    Measure = SUM('Table'[Actual])-SUM('Table'[Budget])

    2)Create a measure to define font format and apply it to above measure:

    Format = SWITCH(true,[Measure]>0,"#FF0000",[Measure]<0,"#008000")

    And it shows:

    3)Add a column and change it not summarize:

    When you remove [Department], it shows:

    if you do not want to display the blank column, you can turn off ‘Word wrap’ function in visual format/column headers:

    And it shows:

    Here is my test pbix file:

    pbix 

     

    Best Regards,

    Giotto Zhi

     

7 Replies

  • v-gizhi-msft's avatar
    v-gizhi-msft
    Community Support

    Hi,

     

    According to your description, I think that any table which doesn't have a grouping displayed as a single row doesn't support conditional formatting.

    Reference:

    https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#considerations-and-limitations

     

    And I have a workaround for your problem, so I create a table to test:

    please take following steps:

    1)Create a measure to minus [Actual] and Budget:

    Measure = SUM('Table'[Actual])-SUM('Table'[Budget])

    2)Create a measure to define font format and apply it to above measure:

    Format = SWITCH(true,[Measure]>0,"#FF0000",[Measure]<0,"#008000")

    And it shows:

    3)Add a column and change it not summarize:

    When you remove [Department], it shows:

    if you do not want to display the blank column, you can turn off ‘Word wrap’ function in visual format/column headers:

    And it shows:

    Here is my test pbix file:

    pbix 

     

    Best Regards,

    Giotto Zhi

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Shahin ,

     

    Could you please show your sample data or screenshaot or measure of your report?

     

    Because it always works in my report.

     

    Aiolos Zhao

    • Shahin's avatar
      Shahin
      Frequent Visitor

      Hi Anonymous 

      On the left I have my measure against department which works pefectly fine but as soon as I remove the department from the table (table on the right) the conditional fromating stops working.

       

      Thanks 

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Shahin ,

         

        Are you using a Field value to do the conditional formatting?

         

        If yes, could you please share your Field value measure?

         

        Aiolos Zhao