Forum Discussion
smoothbrain
2 years agoNew Member
Multiple IF followed by NOT (syntax error?)
Hey team, Recieved a lot of really useful information from this community already! Thank you! I'm essentially converting GUID's from Salesforce back to staff names for a visual: Staff =
...
- 2 years ago
Hey Smoothbrain,
If you want to check if a value is in a list of values, you'd use the following syntax:'DataTable'[Staff GUID] IN { "005Mn1234567", 005Mn1234568" }If you are creating a calculated column, the following pattern might be easier to maintain.
New Column = SWITCH ( 'DataTable'[Staff GUID], "005Mn1234567", "Joe Bloggs", "005Mn1234568", "Jane Doe", 'DataTable'[Staff GUID] )
justinmartin
2 years agoMicrosoft Employee
Hey Smoothbrain,
If you want to check if a value is in a list of values, you'd use the following syntax:
'DataTable'[Staff GUID] IN { "005Mn1234567", 005Mn1234568" }
If you are creating a calculated column, the following pattern might be easier to maintain.
New Column =
SWITCH (
'DataTable'[Staff GUID],
"005Mn1234567", "Joe Bloggs",
"005Mn1234568", "Jane Doe",
'DataTable'[Staff GUID]
)smoothbrain
2 years agoNew Member
justinmartin that's done the trick! Thank you!