Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Wrong values derived when replacing values from another column

Hi,

 

When I prepared date for work completed, I use the logic below:

= Table.AddColumn(#"Changed Type15", "Custom", each if [WO Work Completed] <> #date(2099, 12, 31) then [WO Work Completed] else if [WO Date As Built Sub] <> #date(2099, 12, 31) then [WO Date As Built Sub] else if [WO Date As Built Rec] <> #date(2099, 12, 31) then [WO Date As Built Rec] else if [Date TECO 1st] <> #date(2099, 12, 31) then [Date TECO 1st] else #date(2099, 12, 31)).

 

However, the results are shown below:

WORK ORDERWO Work CompletedWO Date As Built SubWO Date As Built RecDate TECO 1stWork Completed Date DerivedWork complete date ExpectedVariance
40013831   21/05/201421/05/201421/05/2014              -  
40013249   10/09/20149/10/201410/09/2014-     29.00
40013250   10/09/20149/10/201410/09/2014-     29.00
40013251   10/09/20149/10/201410/09/2014-     29.00
40013253   10/09/20149/10/201410/09/2014-     29.00

 

I found that the month and day were exhanged. how to fix these?

 

Regards,

 

Ling 

Status: Needs Info
Comments
v-qiuyu-msft
Community Support

Hi @hlin,

 

I'm not very clear the issue. From your posted power query, there should be a new column named "Custom". But in your results table, there is no "Custom" column returned. 

 

Please share some sample table data before you add the custom column, and clarify the result you desired. 

 

Best Regards,
Qiuyun Yu  

Vicky_Song
Impactful Individual
Status changed to: Needs Info
 
hlin
Regular Visitor

Hi Vicky,

 

Thank you for your effort. actually the column from the calculation should be Work Completed Date Derived. I added a word of "derived" intending to make it clearer, but caused a bit confusion, sorry.

 

Regards,

 

Ling