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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

Date Comparison

Hello,

 

I am wondering if someone can assist me with how to write the following statement that will be added to a Date Slicer.

 

IF Date_Closed Is >= Expected Dated_Closed, use Expected Date_Closed

Else use Date_Closed

where Status = Won

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I was able to resolved as such:

kworkwiz_0-1657059182740.png

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

I was able to resolved as such:

kworkwiz_0-1657059182740.png

 

amitchandak
Super User
Super User

@Anonymous , a new column

 

if([Status] = "Won", if([Date_Closed] > [Expected Dated_Closed] ,[Expected Dated_Closed] ,[Date_Closed]), blank())

Anonymous
Not applicable

Thank you for replying.  It is still a bit off.  Let me rephrase original:

 

IF Date_Closed Is >= Expected Dated_Closed, use Expected Date_Closed

Else use (Date_Closed where Status = Won)

 

Getting an error like this: 

Compare_Dates = if([Status] = "Won" && if ([Date_closed] <> blank, if([Date_Closed] >= [Expected_Close_Date][Expected_Close_Date] ,[Date_Closed]), blank()))
 
of The syntax ',' is incorrect.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.