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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Comparing Date Diff between Two Date fields but need to know if Met OnTime

Comparing Date Diff between Two Date fields to determine if my team is meeting expectations OnTime.   

 

I have determined the duration between the dates but need to know:

  • Is the Close Date Month (field/column) is =/> Expiration Date Month (field/column)

If YES - KPI Met (OnTime)

If No - KPI Met (not OnTIme and how many months are we behind)

 

I just can't seem to figure out this formula.

 

Thanks!

Lisa

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , You can have new columns like

 

KPI Status = if([Close Date Month] >=[Expiration Date Month],"KPI Met (OnTime)", " KPI Met (not OnTIme)")

Diff when not met = if([Close Date Month] >=[Expiration Date Month],blank() , datediff([Close Date Month],[Expiration Date Month],day))

 

or  one combined  


combined = if([Close Date Month] >=[Expiration Date Month],"KPI Met (OnTime)", " KPI Met (not OnTIme) ") & if([Close Date Month] >=[Expiration Date Month],blank() , datediff([Close Date Month],[Expiration Date Month],day)) & " months behind"

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , You can have new columns like

 

KPI Status = if([Close Date Month] >=[Expiration Date Month],"KPI Met (OnTime)", " KPI Met (not OnTIme)")

Diff when not met = if([Close Date Month] >=[Expiration Date Month],blank() , datediff([Close Date Month],[Expiration Date Month],day))

 

or  one combined  


combined = if([Close Date Month] >=[Expiration Date Month],"KPI Met (OnTime)", " KPI Met (not OnTIme) ") & if([Close Date Month] >=[Expiration Date Month],blank() , datediff([Close Date Month],[Expiration Date Month],day)) & " months behind"

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you!

edhans
Super User
Super User

Please provide some sample data with expected results.

How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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