Model Lookup Function and Aggregate Models

I have two models based on a customer billing object.  They are both aggregate models.  The first is designed to aggregate all open billings for each customer.  The second is designed to aggregate all open billings so that we can view total open billings for our company.  I would like to model lookup the value displayed in the second object into each line of the first aggregate model, but am having trouble doing so. Example:

Aggregate 1:
                     Open Billings (each line will possible contain multiple billing)
Customer 1 - $30
Customer 2 - $60
Customer 3 - $40

Aggregate 2 - 

Total Open Billings: $130

I would like to get the $130 value place on each line of aggregate 1.  Thanks for the help.

Danny -
Thanks for your question.  I assume your second aggregate model only has one row?  In that case, you should be able to do a model lookup like this on Aggregate Model 1:


Skuid automatically adds Id’s for reference to the aggregate model rows, so to ensure that the Id of the one row in Aggregate Model 2 is equal to “1”, move that model to the top in your composer so it loads first.

In addition, remember to replace the totalOpenBilling with the actual alias name generated on Aggregate Model 2 for the total amount.

Hope this helps!

Thanks, Christine.  
Yes, the second aggregate model only has 1 row.
With your solution I am now pulling a number, but it is the incorrect number.  The number is larger than the number shown on Aggregate 2.  Any ideas? I checked the condition on both models to ensure they were the same, and they both feed from the same object.

Can you post an image of your model lookup function and your aggregate model setup?

Aggregate 1:
!( 2 inline.png “Image:”)
Aggregate 1 UI field: !( 2 inline.png “Image:”)
Model Lookup in Aggregate 1 UI field formula:
!( 2 inline.png “Image:”)
Aggregate 2:
!( 2 inline.png)
Aggregate 2 Aggregation:
!( 2 inline.png)

Your setup looks good to me, do you have multi-currency enabled in your org? I know that when you aggregate a currency field, the result is in the default orgs currency. If this isn’t the issue, can you grant Skuid login access so we can take a look at the page?