Forum Discussion

Ramakrishna7032's avatar
Ramakrishna7032
New Member
3 years ago
Solved

Power query to find date present between two dates

I have a date field in my table i want to write a power query for new column to find date between two dates. if present it returns true else false 

 

  • Hi Ramakrishna7032 ,

     

    Add a custom column and see if it works.

    if [DateKey]> Date.FromText("01/01/2022") and [DateKey]< Date.FromText("31/01/2022") then 1 else 0

     Hope this helps.

     

    Did I help you today? Please accept my solution and hit the Kudos button.

2 Replies

  • davehus's avatar
    davehus
    Memorable Member

    Hi Ramakrishna7032 ,

     

    Add a custom column and see if it works.

    if [DateKey]> Date.FromText("01/01/2022") and [DateKey]< Date.FromText("31/01/2022") then 1 else 0

     Hope this helps.

     

    Did I help you today? Please accept my solution and hit the Kudos button.

    • Ramakrishna7032's avatar
      Ramakrishna7032
      New Member

      Hi davehus,

      Appreciated your solution. I had one more question like can we write a power query to know the term is updated in last 24 hours??

      thanks in advance