The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello Everyone,
I am looking to add conditional formatting to a date column to highlight due dates using Red, Abber and Green.
My date column is called 'Cancellation Date'. I would like to highlight dates as follows:
Anything due before today = Red
Anything due in the next 6 months = Amber
Anything due in more than 6 months = Green
Any assistance would be much appreciated.
Solved! Go to Solution.
hi, @AMBP1973
try below code
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly. Appreciate your kudos
hi , @AMBP1973
try below Dax code and adjust your table and column name
output =
chane gradient to field value
choose your measure name and press ok.
you get your result.
refer Here to download pbix. file of your requirnment.
@Dangar332 This is amazing, thankyou so much. It is mainly working well except the dates before today are highlighting yellow instead of red? Any suggestions please?
hi, @AMBP1973
check below it's correct compare today date . i mention today date(to) in image
if you still not get your answer provide some data
Hi @Dangar332 , I have checked the DAX I input and it is exactly as you have stated. Here is a snapshot of the cancellation date colomun. Thankyou for your ongoing assistance.
hi, @AMBP1973
try below code
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly. Appreciate your kudos
is this solution or still not get answer ?
Hi @Dangar332 . I just thought this could be acheived as I have seen it in a simular question before, but it wasn't quite what I was after. As listed in my question this would be based on a date column called 'Cancellation Date'. I would like to highlight dates as follows:
Anything due before today = Red
Anything due in the next 6 months = Amber
Anything due in more than 6 months = Green
Thankyou in advance
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |