Forum Discussion
Modfiy Date field
Hey Worlock
First off, if the time in the first column is wrong and unecessary, go into query editor and convert the column to date instead of date time format.
Then, all you need to get the correct date is created a calculated columns with the DATEADD function: https://docs.microsoft.com/en-us/dax/dateadd-function-dax
Correct Day = DATEADD(Table[date], 1, Day)
Then check out this thread on combining date & time: https://community.powerbi.com/t5/Desktop/Unify-Date-and-Time-columns-into-one-DateTime-column/td-p/25820
It is possible though not always recommend. If you still want to do it read this thread: https://community.powerbi.com/t5/Desktop/data-and-time-merge-issue/td-p/140322
There is an option "Combine Date and Time" as stated in the above thread.
This is the correct way to do it with a measure if you so choose:
If this helps please kudo.
If this answers your question please accept it as a solution.
For some reason my reply isn't posted. This happens to me all the time when I'm nog logged in. But I am still able to hit the "Post" button? Anyway, I'll try it again:
I am already failing in the first step, I try to create a meassure with this code:
MdxScript(Model) (4, 35) Calculation error in measure 'Tankbeurten'[Correct Day]: A table of multiple values was supplied where a single value was expected.
- v-juanli-msft6 years agoCommunity Support
Hi Worlock
I can reproduce this error with a measure.
as a workaround, It would work with a calculated column.
It seems it is impossible to use "DateAdd" in that way for a measure.
You could use "DateAdd" in a measure in ways below:
Measure = CALCULATE(COUNT('Table'[Date]),DATEADD('Table'[Date],1,DAY))Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.