Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Morning,
Just looking to apply conditional formatting to cases that are overdue updates. In this example, the last update is far greater than 2 days but is still showing 0. Have I got something wrong in the measure or is if for some reason not recognising the date?
Solved! Go to Solution.
Hi @richrich123 ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Older than 2 days = 
IF(DATEDIFF(SELECTEDVALUE('Case'[lastcustomerupdate]),TODAY(),DAY)>2,1,0)
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Idrissshatila , hi and thanks for the suggestion. I have tried swapping today() to before my selected date but it then is only offering me to compare to measures in the case data and not my selected date? All those in the drop down are measures only and don't contain any fields e.g my lastupdated filed.
Hello,
can you paste the first measure here
 
 
 
 Proud to be a Super User!  |   | 
Try it like this
Older than 2 days = IF( DATEDIFF(TODAY(), SELECTEDVALUE('Case'[lastcustomerupdate].[Date]),DAY) > 2,1,0)
 
 
 
 Proud to be a Super User!  |   | 
Thanks, it accepted that measure but its still returning 0 for every item including those over 2 days?
try it now :
Older than 2 days = IF( DATEDIFF(SELECTEDVALUE('Case'[lastcustomerupdate].[Date]),TODAY(), DAY) < -2,1,0)
 
 
 
 Proud to be a Super User!  |   | 
Weird, you're sure its the right date field that's referenced in the dax measure?
 
 
 
 Proud to be a Super User!  |   | 
@Idrissshatila Have double checked and also removed and re-added fields. You can see the date field and the dax measure both tie up and are the same measure and date field in the measure as is applied to the table fields? Have double checked and all looks spot on
Checked it is 100% formatted as a date field as well and all fine
Try this:
Older than 2 days = IF( DATEDIFF('Case'[lastcustomerupdate],TODAY(), DAY) >2,1,0)
 
 
 
 Proud to be a Super User!  |   | 
then lets try it like this
Older than 2 days = IF( DATEDIFF(SELECTEDVALUE('Case'[lastcustomerupdate].[Date]),TODAY(), DAY) >2,1,0)
 
 
 
 Proud to be a Super User!  |   | 
The measure works but again, output for a date far greater than 2 days old is still zero.
Hi @richrich123 ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Older than 2 days = 
IF(DATEDIFF(SELECTEDVALUE('Case'[lastcustomerupdate]),TODAY(),DAY)>2,1,0)
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous - amazing - that has worked, thanks very much for your assitance, much appreciated.
Hello,
Try switching the two dates, put the today(), then the your selected date.
If I answered your question, please mark my post as solution, Appreciate your Kudos!
 
 
 
 Proud to be a Super User!  |   | 
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.