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
metcala
Helper III
Helper III

Conditional formatting of date based on filter value

Hi

 

I'm just after some advice on how I can highlight rows which have not had comments in red and not had comments in the last two weeks in amber.

 

Data Structure

 

Status

 

Reporting MonthIDTeamSiteCompletion Target
30/4/231001AW30/6/23
30/4/231002AX31/8/23
30/4/231003BY30/9/23
31/5/231001AW30/6/23
31/5/231002AX31/8/23
31/5/231003BY30/9/23
31/5/231004AZ31/10/23

 

Update

 

IDUpdate DateUpdate
100128/2/23On target
100128/5/23On target
10021/5/23Behind schedule by 4 weeks
100420/5/23On target

 

Expected Outcome

Slicer - Reporting Month 31/5/23

 

ID  TeamSiteCompletion Target
1001     
 28/2/23    
  On targetAW30/6/23

 

28/5/23    

 

 On targetAW30/6/23

1002

     
 1/5/23    
  Behind schedule by 4 weeksAX31/8/23
1003  BY30/9/23
1004     
 20/5/23    
  On targetAZ31/10/23

 

Rows set as ID, Update Date and Update so can be collapsed for summarised view.

 

When I go on Team > Conditional Formatting and select Update Date as the field the only option showing is Count. Not sure if I need to add a measure for calculating the difference between max Update Date and Reporting Date selected in the slicer.

 

Hopefully this makes sense and any pointers in the right direction would be very much appreciated!

 

Thanks in advance.

 

 

1 ACCEPTED SOLUTION
metcala
Helper III
Helper III

Hi

 

I have just resolved this with the following DAX measure

 

Days since update =
VAR SelectedDate = MAX('Status'[Reporting Month])

RETURN
   DATEDIFF(

      CALCULATE(

         MAX('Update'[Update Date]), ALLEXCEPT('Status','Status'[ID])),

         SelectedDate,

         DAY

   )

)

 

Hope this is of use to someone.

View solution in original post

1 REPLY 1
metcala
Helper III
Helper III

Hi

 

I have just resolved this with the following DAX measure

 

Days since update =
VAR SelectedDate = MAX('Status'[Reporting Month])

RETURN
   DATEDIFF(

      CALCULATE(

         MAX('Update'[Update Date]), ALLEXCEPT('Status','Status'[ID])),

         SelectedDate,

         DAY

   )

)

 

Hope this is of use to someone.

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.