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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
cingram11
New Member

Conditional Formatting

I have a column with estimated runout date and column with next order date I want to make the background of that cell red for estimated runout date if estimated runout date comes before next order date.

7 REPLIES 7
v-venuppu
Community Support
Community Support

Hi @cingram11 ,

I hope the information provided is helpful.I wanted to check whether you were able to resolve the issue with the provided solutions.Please let us know if you need any further help.

Thank you.

v-venuppu
Community Support
Community Support

Hi @cingram11 ,

May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.

Thank you.

v-venuppu
Community Support
Community Support

Hi @cingram11 ,

I wanted to check if you had the opportunity to review the information provided and resolve the issue..?Please let us know if you need any further assistance.We are happy to help.

Thank you.

v-venuppu
Community Support
Community Support

Hi @cingram11 ,

Thank you for reaching out to Microsoft Fabric Community.

Thank you @KNP @burakkaragoz for the prompt response.

 

I have created a PBIX file using sample data to replicate the scenario.Please go through the attached PBIX file for your reference.

 

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

Thank you.

burakkaragoz
Community Champion
Community Champion

Hi @cingram11 ,

 

You can totally do that with conditional formatting in Power BI. Here’s how:

  1. Go to your table visual and select the column Estimated Runout Date.
  2. Click on the dropdown next to the column name in the Values section, then choose Conditional formatting > Background color.
  3. In the formatting window, switch to Format by: Field value.
  4. Create a new measure like this:
RunoutColor = 
IF(
    'YourTable'[EstimatedRunoutDate] < 'YourTable'[NextOrderDate],
    "#FFCCCC", // light red
    BLANK()
)
  1. Use this measure as the field for background color.

This will highlight only the rows where the runout date is earlier than the next order.

Let me know if you're using a matrix or need to apply this logic differently.

If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.

Translation and formatting supported by AI

I appreciate your quick response! I am using a matrix for this. Would this need to be applied differently?

@cingram11 - You're not giving us a lot to work with here. A screenshot, some data to work with would be helpful.

 

Take some time to understand the below screenshot. I've tried to colour code it so I can explain it easier.

 

KNP_0-1751397707579.png

  • Create the measure that describes your rule. I've used a switch statement in this example. I don't have your data to work with and my data always evaluates to green, which is why the quantity in the matrix is showing in green.
  • The light red sections (rows or columns) can't be conditionally formatted like this. Only the values (light green highlight) can be conditionally formatted in a matrix.
  • Make sure you set the data type to text in your formatting measure.
  • If you need to highlight your date and you need to use a matrix, you might be able to move your next order date to the values section and set the aggregation to 'Latest'.

KNP_1-1751398032818.png

 

 

This answer was not generated from AI because I know what I'm doing. 🤣

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.