Forum Discussion

richrich123's avatar
richrich123
Icon for Helper III rankHelper III
3 years ago
Solved

Where 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 wrong in the measure or is if for some reason not recognising the date? 

 

16 Replies

  • 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!

    Follow me on Linkedin

  • 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.

     

     

      • richrich123's avatar
        richrich123
        Icon for Helper III rankHelper III

        Idrissshatila 

         

        Older than 2 days = IF( DATEDIFF(SELECTEDVALUE('Case'[lastcustomerupdate].[Date]),TODAY(), DAY) > 2,1,0)