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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
AstaBr
Helper II
Helper II

Adding a new date column to bring colored column that pasted 6 weeks breach

Hi,

 

What would be the way to get the above implemented on the live data please. We need to get one of the worksheets on the PowerBI to color if it pasted 6 weeks review date (if the review was not left on the project for more then 6 weeks) and another with oppsite, the date column which is due (within 4 weeks ahead) to get colored.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks for the reply from Rupak_bi , please allow me to provide another insight:

Hi, @AstaBr 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_0-1724310632122.png

2. Below are the measure I've created for your needs:

MEASURE =
IF (
    DATEDIFF ( MAX ( 'Table'[The date of the latest update] ), TODAY (), WEEK ) >= 6,
    "RED"
)

3.Then, as shown in the image, modify the settings of the visualization:

vlinyulumsft_1-1724310677702.png

vlinyulumsft_2-1724310677702.png

4.Here's my final result, which I hope meets your requirements.

vlinyulumsft_3-1724310689571.png

5.Here is the relevant documentation:

 DATEDIF function - Microsoft Support

 

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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

7 REPLIES 7
AstaBr
Helper II
Helper II

Could you also help me out doing similar thing on the data that has past date and will be expiring within 2 weeks please? I have a column for 'QIA/EIA expected Completion Date' and we need to highlight the columns that are expired or will within next 2 weeks.

 

 

 PowerBI Measure.PNG

AstaBr
Helper II
Helper II

Hi,

 

Could you please help me to create a measure for the above as well?

PowerBI Measure.PNG

AstaBr
Helper II
Helper II

Hi,

There is a column with 'Latest updated date' which i want to change colour if staff haven't updated the project over the 6 weeks. Currently, I do it manualy in conditional formating which is not what i would like to keep on doing. If there is some kind of formula that we can create please?Powerbi.PNG

 

Anonymous
Not applicable

Thanks for the reply from Rupak_bi , please allow me to provide another insight:

Hi, @AstaBr 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

vlinyulumsft_0-1724310632122.png

2. Below are the measure I've created for your needs:

MEASURE =
IF (
    DATEDIFF ( MAX ( 'Table'[The date of the latest update] ), TODAY (), WEEK ) >= 6,
    "RED"
)

3.Then, as shown in the image, modify the settings of the visualization:

vlinyulumsft_1-1724310677702.png

vlinyulumsft_2-1724310677702.png

4.Here's my final result, which I hope meets your requirements.

vlinyulumsft_3-1724310689571.png

5.Here is the relevant documentation:

 DATEDIF function - Microsoft Support

 

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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



That's amaizingm thank you ever so much.
Rupak_bi
Impactful Individual
Impactful Individual

Unable to understand. Please share sample data and then explain the requirement



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/
Rupak_bi
Impactful Individual
Impactful Individual

You can do it by creating a flag based on your logic  in calculated column and then refer that flag column in conditional formatting and defining different colour of flag values. Flag values will be numbers



Regards
Rupak
FOLLOW ME : https://www.linkedin.com/in/rupaksar/

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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