Forum Discussion
RappJ
Helper I
4 years agoComparing dates not working correctly in nested table
Good all, Any idea why this snippit will not work as expected. Note some of the retuened checks are correct and some are not. I double checked all data types and all three are set to date (MM/DD/YY...
Anonymous
4 years agoNot applicable
try rhis change...
Table.AddColumn(#"Renamed Columns", "Hours1", each
let
N = Value.ReplaceType([AdjCreatedDate], type date),
X = Value.ReplaceType([RefDate], type date)
in Table.AddColumn([Runs], "FiltHours", (r)=> if N <= Value.ReplaceType(r[RunDate], type date) and X >= Value.ReplaceType(r[RunDate], type date) then "True" else "False"))
- RappJ4 years ago
Helper I
Rocco,
Thank you for the reply. This code is having the same issue where dates outside the range are still being flagged as true.
Jason