Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
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
Solved! Go to Solution.
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
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