Forum Discussion

TeamCanada26__'s avatar
TeamCanada26__
Frequent Visitor
4 years ago
Solved

Power Query Formula with IF and END.OF.MONTH

I am looking to add a new column with a bit of equations in it.

 

This is what I am hoping to achieve in language:

 

IF Job Requistion Status = "Closed" then use the EndOfMonth of the End date

IF Job Requisition Status = "Filled" and End Date is null then EndOfMonth  of the Requisition Close Date

Else EndofMonth on todays date.

 

Any help appreciated.

  • Use this

    = if [Job Requistion Status]="Closed" then Date.EndOfMonth([End Date]) else
    if [Job Requistion Status]="Filled" and [End Date]=null then Date.EndOfMonth([Requisition Close Date]) else Date.EndOfMonth(Date.From(DateTime.FixedLocalNow()))

2 Replies

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    Most Valuable Professional

    Use this

    = if [Job Requistion Status]="Closed" then Date.EndOfMonth([End Date]) else
    if [Job Requistion Status]="Filled" and [End Date]=null then Date.EndOfMonth([Requisition Close Date]) else Date.EndOfMonth(Date.From(DateTime.FixedLocalNow()))