Forum Discussion
Adding New column in advanced editor not pulling through
- 4 years ago
Hi Anonymous,
Try this code. I replaced "[All Chars]"s with the relevant column names.let Source = SharePoint.Tables("a sharepointlist", [Implementation="2.0", ViewMode="All"]), #"b0c46bfb-56a4-4ca3-923d-6f0c9a6948f2" = Source{[Id="b0c46bfb-56a4-4ca3-923d-6f0c9a6948f2"]}[Items], #"Type modifié" = Table.TransformColumnTypes(#"b0c46bfb-56a4-4ca3-923d-6f0c9a6948f2",{{"ContractReview", type date}, {"MeasureStartProcessDate", type date}, {"PreMeasureStartDateChecksT-2", type date}, {"MeasureDateCompletion", type date}, {"MeasureCompletion", type date}, {"OrderPlacement", type date}, {"ConfirmationFromSupplier", type date}, {"DeliveryDateExpectedSuppliedToClient", type date}, {"ConfirmationToClientOfGarmentReceipt", type date}, {"PreInstallMeeting", type date}, {"InstallationDate", type date}, {"Created", type date}}), #"Expanded Modified By" = Table.ExpandListColumn(#"Type modifié", "Modified By"), #"Expanded Modified By1" = Table.ExpandRecordColumn(#"Expanded Modified By", "Modified By", {"id", "title", "email", "sip", "picture"}, {"Modified By.id", "Modified By.title", "Modified By.email", "Modified By.sip", "Modified By.picture"}), #"Expanded Created By" = Table.ExpandListColumn(#"Expanded Modified By1", "Created By"), #"Expanded Created By1" = Table.ExpandRecordColumn(#"Expanded Created By", "Created By", {"title"}, {"Created By.title"}), CleansedOldMIV = Table.AddColumn(#"Expanded Created By1", "CleansedOldMIV", each Text.Select([OldMIV], {Character.FromNumber(46),Character.FromNumber(48)..Character.FromNumber(57)})), CleansedPredictedMIV = Table.AddColumn(CleansedOldMIV, "CleansedPredictedMIV", each Text.Select([PredictedMIV], {Character.FromNumber(46),Character.FromNumber(48)..Character.FromNumber(57)})), CleansedActualMIV = Table.AddColumn(CleansedPredictedMIV, "CleansedActualMIV", each Text.Select([ActualMIV], {Character.FromNumber(46),Character.FromNumber(48)..Character.FromNumber(57)})) in CleansedActualMIV
If this doesn't work, please send a screen capture of the table structure before adding the 3 "cleaned" columns.
You can use: Table.Schema(#"Expanded Created By") to generate the schema.
Anonymous my pleasure 🙂
Hey, check out my showcase report - got some high level stuff there 🙂
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up over there if you liked it 🙂
will do thankyou 🙂 I found the cause of the conversion issues - people in the freetext field when adding numbers have devided they want to input figures with two decimal points like this 1.000.10 rather than using nothing or commas. Joy
- SpartaBI4 years agoCommunity Champion
Great! 😀