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.
I am trying to calculate date difference between today - some column of date in my table. I created a calculated column to accompish this. However, the result I got is in the date/time format. So I went ahead and changed the data type to whole number. Now, I see that if the number of days are different for the same date. If the time is in AM, then number of days is let's say X. Else if it's PM, then it's X-1. How do I fix this ?
As you can see from this table, the last row should be 12 as well since it's the same date. But since it's PM, the date is reduced by one.. not sure why.
Solved! Go to Solution.
On 'Jobs (2)'[Date] add the extra modifier .[Date]. This should strip the time off of it and give you what you want.
NumDays = TODAY() - 'Jobs (2)'[date].[Date]
I did this in one of my reports and it worked correctly. (current time is 10:53 AM)
Created Dt NumDays NumDaysWithNoDateModifier
7/23/2015 12:45:28 PM 599 598
9/1/2015 8:27:37 AM 559 559
Hope this helps
David
On 'Jobs (2)'[Date] add the extra modifier .[Date]. This should strip the time off of it and give you what you want.
NumDays = TODAY() - 'Jobs (2)'[date].[Date]
I did this in one of my reports and it worked correctly. (current time is 10:53 AM)
Created Dt NumDays NumDaysWithNoDateModifier
7/23/2015 12:45:28 PM 599 598
9/1/2015 8:27:37 AM 559 559
Hope this helps
David
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 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |