Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a data set which loads a list of [Room Name] and the [Building] they are located in. Some of those [Room Names] exist in a separate document I manage listing [Event Spaces]. When a [Room Name] from my data set matches one existing in [Event Spaces], I have it return the value "Event Space" in a new [Room Type] field.
Reference_Sheet:
LOAD [Event Spaces]
[External Spaces]
from doc.xls;
Data_Sheet1:
LOAD [Room Code]
Building
[Other Data]
if(exists([Event Spaces],[Room Code]),'Event Space') as [Room Type]
from data.xls;
// This is repeated for Data_Sheet2, Data_Sheet3, and Data_Sheet4
However, there are some [Room Code] that do not appear on my [Event Spaces] list. They would be designated by the [Building] name "External NA", "External EMEA", or "External APAC". How can I change my code to capture those as 'Event Space' on [Room Type] as well?
I tried:
if(exists([Event Spaces], [Room Code] or Building),'Event Space') as [Room Type]
//for this one, I added the three possible building names to the [Event Spaces] list
if(exists([Event Spaces], [Room Code])
or
exists([External Spaces], Building),'Event Space') as [Room Type]
Neither one allowed the "External NA", "External EMEA", or "External APAC" to resolve to "Event Space" along with the [Room Code] entries.
Thanks in advance for the help!
Maybe like
if( Exists([Event Spaces], [Room Code])
or Match(Building,'External NA', 'External EMEA', 'External APAC' )
,'Event Space') as [Room Type]
That worked perfectly, and elegantly. Just what I needed. Thank you.