Forum Discussion
HANA Data and Sharepoint data acting different using same Add Column code in Power Query
- 2 years ago
I was able to solve this problem by changing the PO Date Column to Text, Replacing the null with 1/1/1900, then changing the PO Date Column back to date. Then in my new column used this code and it work for everything.
= Table.AddColumn(#"Filtered Rows", "Status", each if [PO Date] <> 1/1/1900 then "Received" else if [Delivery Date] <> null then "On PO" else if [Required Date] <> null then "Plan" else null)
This seems like a bug or something. Not sure why I was able to replace the null as text but not as a date.
Hello, The column is set as a data and when I try to replace the null with 1/1/1888 it does not work. After the replace task, there are still null values in the column.
= Table.ReplaceValue(#"Added Conditional Column",null,#date(1888, 1, 1),Replacer.ReplaceValue,{"PO Date"})
Below is the sample of my PO Date column. This data is from a HANA connection. The same data from sharepoint works perfectly fine.
Thanks
I was able to solve this problem by changing the PO Date Column to Text, Replacing the null with 1/1/1900, then changing the PO Date Column back to date. Then in my new column used this code and it work for everything.
= Table.AddColumn(#"Filtered Rows", "Status", each if [PO Date] <> 1/1/1900 then "Received" else if [Delivery Date] <> null then "On PO" else if [Required Date] <> null then "Plan" else null)
This seems like a bug or something. Not sure why I was able to replace the null as text but not as a date.