Objective
Send a Slack message with a breakdown of the current sprints' issues showing the number of tickets and story points per status and components. Retrieve the data once and filter the results and store those in lookup tables.
Description
In my automation rule, I am doing a lookup using the following JQL:
project = MyProjectNameHere AND type NOT IN (Epic, Initiative, Test) AND sprint IN openSprints()
To avoid running multiple lookups for the same data, I am using a lookup table to store the values. This is working as expected when storing the data for the sprint:

The next challenge was to use the same lookupIssues data and filter the results by status and store the number of issues and sum of the Story Points for the issues that match my criteria. Similarly, I am storing those values in a lookup table.
I have tried numerous routes and have added to my collection of gray beard hairs.
What I've tried thus far...
There may be more, but some smart value conditionals were deleted with the fury of a thousand suns.
Option 1
Using multiple JQL lookups to filter the results and store the values. Here is one of the 8 lookups I am doing:
project = CRM AND type NOT IN (Epic, Initiative, Test) AND sprint IN openSprints()

This was my first approach and it works, but I did not like that it was calling the same data set multiple times, pushing the maximum number of components in my rule, and taking over 20s to run. Not ideal. That is when I had the idea to get the data once and try filtering the result from my first JQL lookup.
Option 2
I created a new rule and kept the first lookup issue step where I returned all of the issues in the current sprint. At a loss of how I would be able to select the issues whose status matches those above, I tried the simpler ask of getting the story points and count for the issues that have the RTB component.
In my tblRTB I have a key of storyPoints and its value is:
{{#lookupIssues}}{{#if(components.name.indexOf("RTB").gte(0))}}{{Story Points}}{{/}}{{/}}This did not return any values when I logged the key (using size or sum).
Option 3
Then I tried a different conditional for my storyPoints value:
{{#lookupIssues}}{{#if(exists(components.name.match("(RTB)"))), "{{Story Points}}{{^last}}, {{/}}", "0.0")}}{{/}}{{/}}This did not yield any values again.
There are probably 20 other options I tried, but before I give up and go back to Option 1, I thought I would reach out for help. Any assistance is greatly appreciated!