Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

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

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community 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

 

Samarth_18_0-1628755852934.png

 

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

 

Samarth_18_1-1628755940767.png

4. You will see below output:-

Samarth_18_2-1628756001570.png

 

Thank you,

Samarth

 

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

2 REPLIES 2
Samarth_18
Community Champion
Community 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

 

Samarth_18_0-1628755852934.png

 

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

 

Samarth_18_1-1628755940767.png

4. You will see below output:-

Samarth_18_2-1628756001570.png

 

Thank you,

Samarth

 

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

amitchandak
Super User
Super User

@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")

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors