I'm trying to use the apply map function to display the outcome of a loan. But I would like to be able to put a restraint on the function so that it shows only for loans with a certain label. I tried to put the applymap in an if-statement and got an error. Is this possible?
please post your script code to get helped.. An if nesting shouldn't be a problem at all. I guess you have a typo. However, it would be more sufficient to create a mapping table which contains inlo the needed labels for this case.
This is how i currently have the code set up. But there is a variable I create after these tables and I want to narrow down the 'Ultimate Outcome' by that variable
LOAD acct_nbr, //Loading the account numbers from the excel sheet along with the 'UltimateOutcome' field it includes
//Integrating an excel sheet to use its contents
(ooxml, embedded labels, table is Sheet1);
//Creating a new table
date(min(prod_dt)) as [Date First 90+], //Taking the min (earliest) production date for an acct that can be found so we know the first date it became 90+
1 as dateFirst90Count,
APPLYMAP('MAP', acct_nbr, ' ?? ') as UltimateOutcome //Using the mapping function to load the 'UltimateOutcome' variable into the LoanLoss table, only for the accounts located in the loanloss table though
Resident Loans //Taking fields from the 'Loans' table
where is90 = 1 //Only looking at the accts that have ever been 90+ at least once
group by acct_nbr; //Grouping by acct number so as to only get one row per acct number