Forum Discussion
Extract Text
- Anonymous6 years ago
power Query, add Conditional column
power Query, add Conditional column
Hi Karlos,
Thanks for this solution, it worked like a charm. Only challenge I am facing here is the font variation, I observed that there are few descriptions which have 16Gb, 16 GB, 16Gb and 16gb as memory size. For now i have added all of these scenarios as condition in column but it would be halpful if i can do the same thing immaterialistic of font and space.
Thanks
- Anonymous6 years agoNot applicable
Hi Anonymous
You can use find and replace for making all the GB's in Capital.
Once all are Capital GB
Then find 16 GB and replace it with 16GB.
Regards,
Harsh Nathani
- Anonymous6 years agoNot applicable
Hey Dude,
You could go to Transform, format, CAPITALISE. This would make everything in that column uppercase, then I guess you'd just need to add additional rules to account for the spaces.
= Table.AddColumn(#"Changed Type", "Custom",
each if Text.Contains([Column1], "16GB") then "16GB"
else if Text.Contains([Column1], "16 GB") then "16GB"
else if Text.Contains([Column1], "32GB") then "32GB"
else if Text.Contains([Column1], "32 GB") then "32GB"
else if Text.Contains([Column1], "64GB") then "64GB"
else if Text.Contains([Column1], "64 GB") then "64GB"
else null)