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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

DAX IF Month and Year Different Than Target

Dear Team

 

Im back with another question. Shown below :

outstandingYear.png

 

 

Thanks any respond

Syaiful

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous 

Try like. new column

if(startOFMONTH([deilvery])>startOFMONTH([RecOrder]),"Outstanding","Ontime")

Or

if(format([deilvery],"YYYYMM")>format(startOFMONTH([RecOrder]),"YYYYMM"),"Outstanding","Ontime")


Appreciate your Kudos.

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@Anonymous Create a custom column that extracts year and adds month and compare.         if (Date.Month([Delivery]) + Date.Year([Delivery])) > (Date.Month([RcvOrder]) + Date.Year([RcvOrder])) then "OUTSTANDING" else "ONTIME")

 

amitchandak
Super User
Super User

@Anonymous 

Try like. new column

if(startOFMONTH([deilvery])>startOFMONTH([RecOrder]),"Outstanding","Ontime")

Or

if(format([deilvery],"YYYYMM")>format(startOFMONTH([RecOrder]),"YYYYMM"),"Outstanding","Ontime")


Appreciate your Kudos.

 

Anonymous
Not applicable

Thanks, Appreciated that

Solved

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.