Forum Discussion
Where have I gone wrong with datediff measure?
- 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 , 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.
- Idrissshatila3 years ago
Super User
Hello,
can you paste the first measure here
- richrich1233 years ago
Helper III
Older than 2 days = IF( DATEDIFF(SELECTEDVALUE('Case'[lastcustomerupdate].[Date]),TODAY(), DAY) > 2,1,0)- Idrissshatila3 years ago
Super User
Try it like this
Older than 2 days = IF( DATEDIFF(TODAY(), SELECTEDVALUE('Case'[lastcustomerupdate].[Date]),DAY) > 2,1,0)