Forum Discussion

KristofferAJ's avatar
KristofferAJ
Icon for Helper III rankHelper III
4 years ago
Solved

If Statement in powerquery

Hi  I need to tweek my datediff calculation to blank out when the results are negative, but I cant't seem to get it right [START DATE] [END DATE] = IF ([END DATE - [START DATE]) >0 then ([E...
  • Shishir22's avatar
    4 years ago

    Hello KristofferAJ ,


    Please try creating custom column as -

     

    if Duration.Days([EndDate]-[StartDate]) < 0 then null else Duration.Days([EndDate]-[StartDate])

     

     

     

     

    Please mark it answer if it solves your issue. Kudos are also appreciated.