The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello All,
I have the following column:
Brand |
Volvo |
2023 07 Volvo |
2023 10 VW |
2022 12 Peugeot |
BMW |
2023 01 BMW |
Peugeot |
Audi |
If the text of the column start with a date, I need to remove only the date, so in my case the first 9 characters (with the bkanks) and only keep the brand names. (When the date appears at the start, the format is Year month)
So the end result would look as below :
Brand |
Volvo |
Volvo |
VW |
Peugeot |
BMW |
BMW |
Peugeot |
Audi |
How could I achieve this in the Power Query ?
Solved! Go to Solution.
Hello, @Chrisjr
let
Source = your_table,
nums = List.Buffer({"0".."9", " "}),
tx = Table.TransformColumns(Source, {"Brand", each Text.TrimStart(_, nums)})
in
tx
Hello, @Chrisjr
let
Source = your_table,
nums = List.Buffer({"0".."9", " "}),
tx = Table.TransformColumns(Source, {"Brand", each Text.TrimStart(_, nums)})
in
tx