Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.