Forum Discussion
Reordering a list
- Anonymous6 years ago
Exactly!
And to your point, I could probably have used List.Intersect instead of List.Select, List.Contains.
Hi benjamin_sasin ,
Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
The data is fairly simple:
"2019","Taipei","Attended"
"Not Attended", "2018", "Hong Kong"
"Jakarta", "Attended", "2018"
etc.
Since there is a limited number of possible statuses, I've extracted these first with:
= Table.AddColumn(#"Replaced Value4", "AttendanceStatus", each if Text.Contains([TAGS],"Not Attended") then "Not Attended" else if Text.Contains([TAGS],"Attended") then "Attended" else "Scanned")
Then removed these with a replace value.
Then I did the same for the year, which is limited to 2019 and 2018 anyway.
After that I cleaned up all the extra quotes and commas.
I don't think there's a more efficient way after looking into this.