March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
157 | |
97 | |
79 | |
69 |