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.
Hi,
Trying to do a simple calculation of days between two dates but although their are no syntax errors in my custom column and error "Expression Error: The name "DATEDIFF" wasn't recognized. Make sure its spelled correctly" comes up. Here's my formula:
DATEDIFF(MIN( Calendar[Enrollment date.Current Registration Status Date] ), MAX( Calendar[Last Accessed]), DAY)
I joined two separate tables so that my dates are in the same Query but I don't think that's the issue. What am I doing wrong?
Thanks,
Val
Solved! Go to Solution.
(MIN( Calendar[Enrollment date.Current Registration Status Date] ) - MAX( Calendar[Last Accessed]) * 1.
Hi @Vtomsons ,
If it needs to be done in power query,using below M code:
Custom = Duration.Days([Date2]-[Date])
And you will see:
If it is done in report view,using below dax expression to create a measure:
Measure = DATEDIFF(SELECTEDVALUE('Table'[Date2]),SELECTEDVALUE('Table'[Date]),DAY)
And you will see:
Or you can create a calculated column as below:
Column = DATEDIFF('Table'[Date],'Table'[Date2],DAY)
And you will see:
Hope the above is what you need.
Hi @Vtomsons ,
If it needs to be done in power query,using below M code:
Custom = Duration.Days([Date2]-[Date])
And you will see:
If it is done in report view,using below dax expression to create a measure:
Measure = DATEDIFF(SELECTEDVALUE('Table'[Date2]),SELECTEDVALUE('Table'[Date]),DAY)
And you will see:
Or you can create a calculated column as below:
Column = DATEDIFF('Table'[Date],'Table'[Date2],DAY)
And you will see:
Hope the above is what you need.
Thanks fellas for the insight. New to all this so it will get easier...I hope.
(MIN( Calendar[Enrollment date.Current Registration Status Date] ) - MAX( Calendar[Last Accessed]) * 1.
Still getting the error"the name MIN wasn't recognized. Make sure its spelled correctly"
Do these two date columns need to be formatted some way? I have them in the date/time
And make sure that you are somewhere that you should be entering DAX code, and not in Query Editor.
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 |
---|---|
114 | |
99 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |