Forum Discussion
Adding a character to certain values in a column
- 6 years ago
Hi , theu1996
As mention by UAV-Test-Pilot ,If the data is lost in excel,I would suggest you to format you table column as text in excel before you enter data.
Then check whether the data lost in data previews.
For how to fill in the missing data, please follow the steps below:
1.exacte the first character of column"machine"
2.create custom column "missingdata" as below:
custome column formula as belowL
=if [Plant] = 17 and ([First Characters of Machine] <> "0") then 0 else ""3.merge column "misssing data" and column"machine"
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
theu1996 In your excel source, is the leading 0 there?
If yes, then you can change the formatting of the column to be text in PowerQuery, but be sure to do this step above any automatic formatting PowerQuery already applied to the source, as that is what is dropping the information.
If no, you can create a custom column to add the 0, when plant = '17' like this:
if ([Plant] = "17" and [Machine] = "211") then "0211" else if ([Plant] = "17" and [Machine] = "306") then "0306" else [Machine]
| If this helped, I would appreciate a Kudos! If this resolves the issue, please mark it as a Solution! 🙂 |