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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
NewbieJono
Post Patron
Post Patron

Conditional formatting dates

is there a method to colour the volumes by days old. e.g if 16th should be Green, 15th amber, 14th Red

 

 

Screenshot 2022-03-19 131244.jpg

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @NewbieJono ;

You also could create a measure as follows:

Measure = SWITCH(MAX('Table'[date]),DATE(2022,3,14),"Red",DATE(2022,3,15),"amber",DATE(2022,3,16),"Green")

Then set condition format.

vyalanwumsft_0-1647912931633.pngvyalanwumsft_1-1647912953428.png

The final output is shown below:

vyalanwumsft_2-1647913012680.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @NewbieJono ;

You also could create a measure as follows:

Measure = SWITCH(MAX('Table'[date]),DATE(2022,3,14),"Red",DATE(2022,3,15),"amber",DATE(2022,3,16),"Green")

Then set condition format.

vyalanwumsft_0-1647912931633.pngvyalanwumsft_1-1647912953428.png

The final output is shown below:

vyalanwumsft_2-1647913012680.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

truptis
Community Champion
Community Champion

Hi @NewbieJono ,

Create a new flag column which says if date is 14th March then 1, if 15th March then 2 & if 16th March then 3. 

Based upon this new flag column, do your conditional formatting which says if it is 1 then green, If 2 then red, if 3 then amber 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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