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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Conditional formatting based on date

Hello Everyone!

 

I am having some issues attempting to create a measure to conditionally format matrix columns based on date. 

 

Here is what I am trying to do:

In a Rolling 12 Month Sales visual, I would like to shade all cells where the month/year is before the Client's Go-Live Date, which in my visual ideally would look like this:

 

Conditional formatting 2.jpg

 

I created the following measure:

 

Before Go-Live = IF(MIN('Calendar'[Date])<MAX('Sales'[Actual Go-Live]),0,1)

And then set up the conditional formatting this way:

 

Confitional formatting 3.jpg

 

But the cells being shaded are those with a value only, and only in the same Month/Year as the client's Go-Live date. The preceding blank cells are not shaded. Here is the result when I turn it on:

 

Conditional formatting.JPG

 

How do I get all cells prior to the client's Go-Live date shaded?

 

Thank you!

 

6 REPLIES 6
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

It seems that your measure didnt return a true value,can you show me your .pbix file?If it's not convenient ,can you take a screenshot of the columns which you put in the matrix visual?

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Anonymous
Not applicable

@v-kelly-msft 

Hi Kelly! I am unable to share the pbix but here are some screenshots. The rows/columns/values for the matrix, the tables used, the relationship and the First 12 measure used in the table. Hope this helps, it is all I can provide. I appreciate it!

 

Columns.jpg

 

Calendar table.jpg

 

clients table.jpg

 

sales table.jpg

 

relationships 2.jpg

 

first 12 measure.jpg

 

MFelix
Super User
Super User

Hi @Anonymous ,

 

Believe this is related with the fact that you have blanks and not 0 try to add a +0 to your measure and check if it works properly.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

@MFelix Thanks for the reply! I am not sure what you mean though: where exactly in the measure do I add "+0"?

 

Thank you!

@Anonymous .

 

Try to redo your measure

 

Before Go-Live = IF(MIN('Calendar'[Date])<MAX('Sales'[Actual Go-Live]),0,1) + 0

 

Be aware that not really sure if this will work, if you can share a sample file if it doesn't work would be helpfull to give you the correct answer.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

@MFelix  Ah I see. I gave this a try and nothing changed. Unfortunately I do not have a sample file that I am able to share at this time but I will try to get something put together that is shareable. Thank you for your help!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors