Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hello everyone,
I have a dataset that looks like this. The date format is not standardized on all columns.
When I tried to change the data type in power query, it triggers an error.
How can I standardize the format of the date columns in power query?
| ID | Plan | GR | Report |
| 1120525 | 07-23-2021 | 07-27-2022 | 07-23-2021 |
| 1120525 | 07-23-2021 | 08-15-2022 | 07-23-2021 |
| 1120525 | 07-23-2021 | 08-30-2022 | 07-23-2021 |
| 1120525 | 07-23-2021 | 06-22-2022 | 07-23-2021 |
| 1120525 | 8/5/2022 | 10/2/2022 | 8/5/2022 |
| 1120525 | 8/10/2022 | 10/2/2022 | 8/10/2022 |
| 1120525 | 9/12/2022 | 10/2/2022 | 9/12/2022 |
Thanks!
Solved! Go to Solution.
NewStep=Table.TransformColumns(PreviousStepName,{"Id",each _},each Date.From(Text.Combine(Text.SplitAny(Text.From(_),"-/"),"-")))
NewStep=Table.TransformColumns(PreviousStepName,{"Id",each _},each Date.From(Text.Combine(Text.SplitAny(Text.From(_),"-/"),"-")))
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 6 | |
| 5 | |
| 5 |