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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jxkang
Frequent Visitor

Power BI Table Conditional Formatting

Not sure if this is possible:

I am trying to highlight cells in a table where 

 

1) If the date is in the past, then green color

2) If the date is in the future, but it is the closest to today compared to other date fields, then blue color

3) If the date is in the future, but it is NOT the closese to today compared to other date fields, then  yellow color

 

jxkang_0-1755192847789.png

 

1 ACCEPTED SOLUTION

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1755217947073.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

6 REPLIES 6
v-achippa
Community Support
Community Support

Hi @jxkang ,

 

Thank you for reaching out to Microsoft Fabric Community.

 

Thank you @Ashish_Mathur@Greg_Deckler and @srlabhe for the prompt response. 

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

Hi @jxkang ,

 

We wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.

 

Thanks and regards,

Anjan Kumar Chippa

srlabhe
Resolver III
Resolver III

Create a measure

DateFlag=if (Date1<today() then 1, 

if(Date2=today() then 2, 0)

use this measure for conditional formatting 

not sure the criteria for Date closer so accordingly change the same

 

Greg_Deckler
Community Champion
Community Champion

@jxkang Is that what your source data looks like or ?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi Greg,
Yes, the dates are in different columns

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1755217947073.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.