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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
MrNationalParks
Regular Visitor

Same point in time If formula

Hello,

 

I work with Warranty data and would like to see claim totals by Model Year at the same point in time. For MY 15 I need to see July 1st, 2015, MY 16 July 1st, 2016, and MY17 July 1st, 2017. I did this in excel by creating a column that gave me a Yes or No based on this If formula:

IF([MY]="2017",IF([Repair Date]<=TODAY(),"Yes","No"),

IF([MY]="2016",IF([Repair Date]<=(TODAY()-365),"Yes","No"),

IF([MY]="2015",IF([Repair Date]<=(TODAY()-730),"Yes","No"),"ErrorF")))

 

I have tried to search how to write If statements in the Custom Column but they do not seem to work. I've tried using If(XXX) and "if then else".

 

Any help on the formula, or other thoughts on how to do it, would be greatly appreciated

1 ACCEPTED SOLUTION
v-caliao-msft
Microsoft Employee
Microsoft Employee

@MrNationalParks,

 

The syntax for IF function in DAX is
IF(logical_test>,<value_if_true>, value_if_false) 

You do no need  "Then" and "Else" keyword in DAX.

https://msdn.microsoft.com/en-us/library/ee634824.aspx?f=255&MSPPError=-2147217396

 

If this is not what you want, please provide us some sample data and elaborate your expected result, so that we can make further analysis.

 

Regards,

Charlie Liao

View solution in original post

1 REPLY 1
v-caliao-msft
Microsoft Employee
Microsoft Employee

@MrNationalParks,

 

The syntax for IF function in DAX is
IF(logical_test>,<value_if_true>, value_if_false) 

You do no need  "Then" and "Else" keyword in DAX.

https://msdn.microsoft.com/en-us/library/ee634824.aspx?f=255&MSPPError=-2147217396

 

If this is not what you want, please provide us some sample data and elaborate your expected result, so that we can make further analysis.

 

Regards,

Charlie Liao

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors