Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Power Query formula

Hello  -  We have business logic that says:  Based on the forecsat lockdown month  (we "lock" our CRM forecast down at the 1st of each month and give it a file name like October 2021), then add 2 mon...
  • BA_Pete's avatar
    BA_Pete
    4 years ago

    Ah, ok.

    Try something like this:

     

    if
    [reqShipDate] >= Date.StartOfMonth(Date.AddMonths([lockDownMonth], 2))
    and
    [reqShipDate] <= Date.EndOfMonth(Date.AddMonths([lockDownMonth], 2))
    then "True"
    else "False"

     

     

    Pete

  • Anonymous's avatar
    Anonymous
    4 years ago

    BA_Pete   Thanks for your help.  With some additonal help in the forums I eventually figured out the correct formula...but you got me a starting point!   

    if
    [Customer Requested Ship Date] >= Date.StartOfMonth(Date.AddMonths([Locked File Month], 2))
    and
    [Customer Requested Ship Date] <= Date.EndOfMonth(Date.AddMonths([Locked File Month], 2))
    then "True"
    else "False"