Forum Discussion
richrich123
Helper III
3 years agoWhere have I gone wrong with datediff measure?
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 w...
- Anonymous3 years ago
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
Super User
3 years agoTry it like this
Older than 2 days = IF( DATEDIFF(TODAY(), SELECTEDVALUE('Case'[lastcustomerupdate].[Date]),DAY) > 2,1,0)
richrich123
Helper III
3 years agoThanks, it accepted that measure but its still returning 0 for every item including those over 2 days?
- Idrissshatila3 years ago
Super User
try it now :
Older than 2 days = IF( DATEDIFF(SELECTEDVALUE('Case'[lastcustomerupdate].[Date]),TODAY(), DAY) < -2,1,0)
- richrich1233 years ago
Helper III
- Idrissshatila3 years ago
Super User
Weird, you're sure its the right date field that's referenced in the dax measure?