Forum Discussion
kpost
3 years agoSolution Sage
Text value alphabetically between two other values, resolved as TRUE/FALSE
I have a column with text values such as: 16101X 16102X 16103X 16C01A 16C02A 16C03A etc. I want to add a calculated column that groups these using a switch statement like so: SWITCH(...
kpost
3 years agoSolution Sage
Unfortunately there is no consistent pattern.
It is a massive sheet containing 10s of thousands of codes that must be grouped somewhat arbitrarily, but in the vast majority of cases they are being grouped like this, where codes that are alphabetically next to each other are grouped into the same groups.
I could do it on the back end using SQL (I'm pulling this from a database originally) and just add a column with a bunch of CASE statements without much trouble, but I'd strongly prefer to do it in Power BI.