Skip to main content

I currently have a calculated field shown below containing the following code:

 

if not ISNULL([selectsponsor]) then 'Select Sponsor'

elseif not ISNULL([impactsponsor]) then 'Impact Sponsor'

elseif not ISNULL([institutionalsponsor]) then 'Institutional Sponsor'

 

else 'Non-Sponsor'

 

END

 

+++++++++++++++++++++++++++++++

 

The code above works great. It gives me each individual sponsor option in a drop-down and then a 4th option, which is everything that doesn't have a sponsor flag (e.g. non sponsor).

 

However, I'm missing 1 option in the drop-down, which is ALL Sponsors. I want to group the sponsors together and pull back all rows that have at least 1 'yes' flag in one of the fields listed in the code above.

 

How would I modify the code to give myself an 'All Sponsor' option? It is worth noting, each transaction can only have 1 sponsor type.

 

An example of the data would be in the grid below:

 

Creating an ALL option 

I want that ALL SPONSOR option that gives me the transactions in GREEN and excludes loan 126 and 129. I'm already covered for those with the non-sponsor option.

 

Last but not least, there can only be one sponsor per transaction. There will not be an instance of two YES flags on the same line.

5 answers
0/9000