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
Hi,
Dein Problem liegt vermutlich in den unterschiedlichen Schreibweisen der Spaltennamen.
GR-Date mit Bindestrich und Doc Date ohne Bindstrich aber mit Leerzeichen. Das erfordert eine differnzierte Kennzeichnung der Spaltenaufrufe:
if [Doc Date]=null or [#"GR-Date"] = null then
null
else
Duration.Days( [#"GR-Date"]-[Doc Date]))
- ronrsnfld5 months ago
Super User
The OP must have edited his file as what I've been seeing for the past 1/2 day shows GR Date, not GR-Date.