Forum Discussion
Weeknum starting on Friday
- 9 years ago
The DATEADD([Dates],-2,DAY) part of the equation doesn't work because some of the dates in my [Dates] column are repeating.
- 9 years ago
then create a new column with date only and work out the week num with your calculation?
what error does it give? i still dont see how that is an issue, why does it care if there is more than one date the same? maybe thats me just with my sql mind on, why not format it as a date only for the calculation and leave the time bit off?
- 9 years ago
No, I don't have to! I've been working with them both though and both DATEADD and WEEKNUM work just fine with the times. I was able to solve the issue though by (I don't understand how this works) duplicating the column and then using the DAX function.
do you have to keep your date and time together? i did some googling and yes you are right, it doesn't like duplicate values
http://stackoverflow.com/questions/39679183/issue-with-dateadd-function-in-dax
No, I don't have to! I've been working with them both though and both DATEADD and WEEKNUM work just fine with the times. I was able to solve the issue though by (I don't understand how this works) duplicating the column and then using the DAX function.