Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
TeamCanada26__
Frequent Visitor

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.

1 ACCEPTED SOLUTION
Vijay_A_Verma
Super User
Super User

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()))

View solution in original post

2 REPLIES 2
Vijay_A_Verma
Super User
Super User

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()))

Thank you!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors