Forum Discussion

Si_7777's avatar
Si_7777
Advocate II
1 year ago
Solved

Easy Conditional Format

Is there a simple way to turn minus numbers to red and positive to green.  The whole conditional format dialog per measure is so long winded and convoluted.  Having to setup a large minus number and large positive number per measure is laborius.

  • Si_7777 

    I think then you need to create a measure for color setting.

     

    measure color = SWITCH(TRUE(),[Measure]>0,"#008000",[Measure]<0,"#FF0000")
     
    then choose field value and select the measure for color setting.
     
     

     

5 Replies

  • Si_7777 

    I think then you need to create a measure for color setting.

     

    measure color = SWITCH(TRUE(),[Measure]>0,"#008000",[Measure]<0,"#FF0000")
     
    then choose field value and select the measure for color setting.
     
     

     

    • Si_7777's avatar
      Si_7777
      Advocate II

      Nice, but would I need to write that for every measure I want to colour.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi Si_7777,

         

        Thanks for reaching out to the Microsoft Fabric Forum Community.

        And aslo Thanks to ryan_mayu  & BhavinVyas3003  for prompt and useful responce.


        Yes, if you want different measures to have dynamic colors based on their own values, you'd typically need a separate color measure for each because each measure has its own logic and values.

        If this helped, please mark the response as the accepted solution and give it a thumbs-up so others can benefit too.

        Best regards,
        Prasanna Kumar

  •  

     

    • Select your Table/Matrix visual.
    • Click on the measure → Conditional formatting → Font color.
    • Choose Format by: Rules
      Based on: Same measure
      Add two rules:
      • If value < 0 → Red #FF0000
      • If value >= 0 → Green #00A000
    • Click OK.

     

    • Si_7777's avatar
      Si_7777
      Advocate II

      The choices int he dialog box are not that simple