cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills 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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors