Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've used an IF statement to collate the variations of Emergency into one.
I'd then like to use the newly created [Emergency Field] later in my code.
How would I do this?
if(Priority='Emergency (24h)', 'Emergency (24h)',
if(Priority='Emergency (24hr)', 'Emergency (24h)',
if(Priority='emergency 24', 'Emergency (24h)',
if(Priority='Emergency 24h', 'Emergency (24h)', 'Non-Emergency')))) AS [Emergency Status]
You can do that with a preceding load.
Load
If([Emergency Status]= ''..xxx...', 1, 0) as NewEmergency
...some other fields...;
Load
if(Priority='Emergency (24h)', 'Emergency (24h)',
if(Priority='Emergency (24hr)', 'Emergency (24h)',
if(Priority='emergency 24', 'Emergency (24h)',
if(Priority='Emergency 24h', 'Emergency (24h)', 'Non-Emergency')))) AS [Emergency Status]
...some other fields...
from ...somewhere...;
The second load pipes the data into the preceding load so the new field Emergency Status is available for use in the preceding load. See this blog post for more information.
You can do that with a preceding load.
Load
If([Emergency Status]= ''..xxx...', 1, 0) as NewEmergency
...some other fields...;
Load
if(Priority='Emergency (24h)', 'Emergency (24h)',
if(Priority='Emergency (24hr)', 'Emergency (24h)',
if(Priority='emergency 24', 'Emergency (24h)',
if(Priority='Emergency 24h', 'Emergency (24h)', 'Non-Emergency')))) AS [Emergency Status]
...some other fields...
from ...somewhere...;
The second load pipes the data into the preceding load so the new field Emergency Status is available for use in the preceding load. See this blog post for more information.