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

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.