Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Measure background based on the other column result

Hi Team,

I have a measure created which shows the a date with some logic, I need that measure back ground clr to be changed when it greater than today and I have a column called status in a table, when that status is not equal to completed.

 

In simple words,

Greater then the mesaure and status is not equal to complted.

 

Regards,

Rakesh

  • Hi Anonymous 

     

    You need to write a measure with required condition and use it in conditional formatting. Follow below steps:-

     

    1. Create a measure with below code

    Format_backgound =
    IF (
        AND (
            [your_measure] > TODAY (),
            MAX ( table[status] ) <> "completed"
        ),
        "red" //you can write any color name which to show if above condition met.
    )

     

    2. Now in format section go conditional formatting and slide on background color

     

     

    3. Once you click on background color you will see below screen then select our formatting measure in it and click ok.

     

    4. You will see below output:-

     

    Thank you,

    Samarth

     

     

2 Replies

  • Samarth_18's avatar
    Samarth_18
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous 

     

    You need to write a measure with required condition and use it in conditional formatting. Follow below steps:-

     

    1. Create a measure with below code

    Format_backgound =
    IF (
        AND (
            [your_measure] > TODAY (),
            MAX ( table[status] ) <> "completed"
        ),
        "red" //you can write any color name which to show if above condition met.
    )

     

    2. Now in format section go conditional formatting and slide on background color

     

     

    3. Once you click on background color you will see below screen then select our formatting measure in it and click ok.

     

    4. You will see below output:-

     

    Thank you,

    Samarth

     

     

  • Anonymous , is that column in the context? if yes, you can create color measure and use that in conditional formatting using field value option

    if(Max(date[date]) <today(), "red", "green")