Forum Discussion
How to recode date by M code when user data entry mistake ?
Hi All
My CSV file have data entry mistake , the date should 04/01/2017 but user enter wrongly .
Can some one share how to recode the date ?
My PBI file :-
https://www.dropbox.com/s/nafv47zueysvzv7/Change%202030%20to%202017%20V002.pbix?dl=0
Paul Yeo
9 Replies
- AnonymousNot applicable
Anonymous -You can replace it with the correct date in Power Query.
- AnonymousNot applicable
Hi Sir
Can you pls share with me how to write M code , if INV = 110102 and date = 04 January 2030 , Replace by 04 January 2017 .
Paul- mahoneypatMicrosoft Employee
Just highlight the Date column in the query editor and click on Replace Values in the ribbon, put 1/4/2030 in first cell and 1/4/2017 in second (assuming you have no rows where 1/4/2030 would be the correct value).
Regards,
Pat
- v-jingzhangCommunity Support
Hi Anonymous , please refer to the image below.
Best regards,
Jing
- AnonymousNot applicable
Hi Jing
That is good suggestion. in case one of the invoice sales staff enter the wrong date , and this date we have 20 invoice , how to change the date link to invoice numner ?
Paul
- v-jingzhangCommunity Support
Anonymous With this replace values function, it will replace all the same wrong date in the selected date column with the correct one no matter what invoices they are linked to.
Jing