Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Icon for Administrator rankAdministrator
3 years ago
Solved

Conditional formatting with measure as rule

Hello.

I have a table with a calculated numeric column, and I want to conditionally format it based on a measure. That is, for each case, if the value of the column is greater than that of the measure, the value in the table will have one color and if it is less it will have another. The problem is that when applying conditional formatting it only lets you enter a numerical value, not a measure. Is there a way to get it?

Thank you.

  • Hi Syndicate_Admin 

    You can create a "flag" measure that will check your condition and return 1 /0.
    For example :

    Flag condition = if(SELECTEDVALUE('Table'[column])>[measure test],1,0)
    and then based on this measure modify conditional formatting:

    Link to a sample file 

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

  • Ritaf1983's avatar
    Ritaf1983
    3 years ago

    Hi Syndicate_Admin 
    As on the desktop, it works the same way in the service.
    Try deleting and republish/ switching workspaces / refreshing the page.

    Try to press "edit" and check conditional formatting settings on service 

     

     

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

3 Replies

  • Hi Syndicate_Admin 

    You can create a "flag" measure that will check your condition and return 1 /0.
    For example :

    Flag condition = if(SELECTEDVALUE('Table'[column])>[measure test],1,0)
    and then based on this measure modify conditional formatting:

    Link to a sample file 

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

  • Hello again.

    Everything is perfect in Desktop but when I upload it as a service the conditional formatting disappears. Any ideas?

    • Ritaf1983's avatar
      Ritaf1983
      Icon for Super User rankSuper User

      Hi Syndicate_Admin 
      As on the desktop, it works the same way in the service.
      Try deleting and republish/ switching workspaces / refreshing the page.

      Try to press "edit" and check conditional formatting settings on service 

       

       

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