Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
If([Reference Date]-[CREATE DATE]>22, AND([Reference Date]-[CREATE DATE]<31, "Y", "N")))
Hello, I am new to writing DAX equations with Power BI and need some help with an IF ... AND ... statemment for a calculated column.
Basically I am trying to write out:
IF (xdate - ydate)>21 days
AND ((xdate - ydate)<31 days
Display "Y"
If not, display "N"
Here is what I have so far
Solved! Go to Solution.
Try
if(and([Reference Date]-[CREATE DATE]>22,[Reference Date]-[CREATE DATE]<31)."Y","N")
IF([Reference Date]-[CREATE DATE] >22 && [Reference Date]-[CREATE DATE]<31, "Y", "N")
The abve one should work.
Thanks
Raj
Try
if(and([Reference Date]-[CREATE DATE]>22,[Reference Date]-[CREATE DATE]<31)."Y","N")
Thank you so much it worked!
Do you know how to insert the OR operator into a DAX equation?
Just use the same format, but replace the if(and( with if(or(
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |