Forum Discussion

aslan's avatar
aslan
Helper I
9 years ago

Matrix Conditional Formatting

I want to give red color background if total value is greater than 10. And if less than 10 is should be green. But there is no option. Do you know any way?

15 Replies

  • v-huizhn-msft's avatar
    v-huizhn-msft
    Microsoft Employee

    Hi aslan,

    As Phil_Seamark posted, I try to reproduce your scenario using the sample matrix.



    Right click the value level->select Conditional Formatting.



    You will get expected result.

     

    If you have other issues, please let me know.

    Best Regards,
    Angelia

    • aslan's avatar
      aslan
      Helper I

      Is it possible to define Number value by variables instead of direct input?

      • v-huizhn-msft's avatar
        v-huizhn-msft
        Microsoft Employee

        Hi aslan,

        Up to now, we are unable to create a variable to control the color.

        Best Regards,
        Angelia

  • Phil_Seamark's avatar
    Phil_Seamark
    Microsoft Employee

    On the conditional formatting options for your measure on the matrix,  Specify the Minimum and Maximum as Numbers and try these values.

     

    Let us know how you get on.

     

     

     

      

  • Anonymous's avatar
    Anonymous
    Not applicable

    I created a table and then tried as a Matrix in Power BI Desktop and the conditional formatting is not an option for me. See picture below.  What am I not doing? I even downloaded a new Power BI Desktop to get any updates I might be missing and then restarted the computer.  Thanks!

     

     

    • aslan's avatar
      aslan
      Helper I

      AnonymousIt can be depend your system. You tried uninstall and reinstall? I have downloaded latest version but still there is no paramater(dynamic) option for conditional formatting.

      • Anonymous's avatar
        Anonymous
        Not applicable

        I did not uninstall and reinstall, is that what is needed to get the upgrades from each release?

    • armely's avatar
      armely
      Helper I

      Anonymous It's because your column is set to "Don't Summarize" if you summarize it you will get Conditional Formatting. Maybe something worth suggesting as a change in Power BI 

  • Anonymous's avatar
    Anonymous
    Not applicable

     Hi there, 

     

    how do I return zero(0) when the field value is empty using the following DAX function (Divide).

     

    Avg. Sales = Divide([total sales] , [total transactions])

     

    Thank you,

    Imran

    • anandav's avatar
      anandav
      Skilled Sharer

      Anonymous,

       

      Try:

      Avg. Sales = Divide([total sales] , [total transactions], 0)

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thank you this actually works.