Forum Discussion
Date Different return wrong value
- 5 months ago
Hi v-achippa vojtechsima ronrsnfld ralf_anton cengizhanarslan ,
Thank you for your assistant and support.
I'm able to populate the Day Diff correctly with your guide. Here is what i did:
1. Transform both Doc Date and GR Date column as some of records may contain text
= Table.TransformColumns(
#"Reordered Columns",
{
{"GR Date", each
if _ = null then
null
else
let
t = Text.From(_),
parts = Text.Split(t,"/")
in
#date(
Number.FromText(parts{2}),
Number.FromText(parts{0}),
Number.FromText(parts{1})
),
type date}
}
)2. Day Diff
= Table.AddColumn(Custom3, "Day Diff", each if [GR Date] = null or [Document Date] = null
then null
else Duration.Days([GR Date] - [Document Date]))TQVM
I cannot reproduce your problem with the information you have provided:
Must be something else going on.
Perhaps a link to a file that will reproduce your problem might be useful (with confidential information removed or obfuscated).