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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. 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())

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 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
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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