Forum Discussion

msciarrino's avatar
msciarrino
Helper I
2 years ago
Solved

HANA Data and Sharepoint data acting different using same Add Column code in Power Query

Hello Everyone,   I have a strange issue I am seeing and I cannot figure out what is wrong or a work around to get it to work. I am connected to a HANA database in power query and a snapshot of tha...
  • msciarrino's avatar
    msciarrino
    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.