Hi @chad.sharpe,
If you are looking to add a column, you can achieve that in Power Query.
Copy this script into a new blank query.
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wyk9Ly0xO1VFIzS3WUSjIL08tSspUitVBSGATK8sszswHi4C1QYTBfLAMqiawEqiOWAA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Test Column" = _t]),
AddOwoE = Table.AddColumn(Source, "Office w/o EMS", each Text.Contains([Test Column], "office", Comparer.OrdinalIgnoreCase) and not Text.Contains([Test Column], "ems", Comparer.OrdinalIgnoreCase), type logical),
AddEwoO = Table.AddColumn(AddOwoE, "EMS w/o Office", each Text.Contains([Test Column], "ems", Comparer.OrdinalIgnoreCase) and not Text.Contains([Test Column], "office", Comparer.OrdinalIgnoreCase), type logical )
in
AddEwoO
But a Calculated column is possible as well
For example:
Office wo EMS (CC) =
VAR String = SUBSTITUTE( 'Sample'[Test Column], ", ", "|")
VAR wOffice = PATHCONTAINS( String, "office")
VAR wEMS = PATHCONTAINS( String, "EMS" )
VAR _Result = AND( wOffice =TRUE(), wEMS = FALSE() )
RETURN
_Result
That basic pattern can also be applied to a measure
For example:
Office wo EMS =
VAR String = SUBSTITUTE( SELECTEDVALUE( 'Sample'[Test Column] ), ", ", "|")
VAR wOffice = PATHCONTAINS( String, "office")
VAR wEMS = PATHCONTAINS( String, "EMS" )
VAR _Result = AND( wOffice =TRUE(), wEMS = FALSE() )
RETURN
_Result
You could combine these 2 tests in a single column by adding a OR statement, of course.
I hope this is helpful.