# Set Conditional Rollup to match a field value

Topic Labels: Base design
Solved
1608 2
cancel
Showing results for
Did you mean:
4 - Data Explorer

I’m rolling up a list of quantities, and need to determine which quantity was the most recently ordered. I have a separate Rollup field on the same table identifying the most recent date, but I need to be able to set the value of the filter on quantity rollup to only show the quantity when the production date matches the date I have in the second rollup field.

Is there a way to set the value of a filter to match a field value?

Cheers,
AK

1 Solution

Accepted Solutions
12 - Earth

Hi @Keith_McFarland and welcome to the community!

The solution I tend to use is to rollup your dates via the linked field to your first table with quantities, and add a lookup field to your first table, looking up that most recent date via the linked field. Then add a formula field that checks if the most recent date is equal to the date of the quantity:

IF({Date Rollup (from quantities) (from rolling up)}=Date,“most recent”)

Then go back to table 2 and rollup the quantities conditionally with “where ‘most recent’ contains ‘most recent’” and use the "SUM(values) to add those quantities.

Table 1: quantities

Table 2

Does that helps you?

2 Replies 2
12 - Earth

Hi @Keith_McFarland and welcome to the community!

The solution I tend to use is to rollup your dates via the linked field to your first table with quantities, and add a lookup field to your first table, looking up that most recent date via the linked field. Then add a formula field that checks if the most recent date is equal to the date of the quantity:

IF({Date Rollup (from quantities) (from rolling up)}=Date,“most recent”)

Then go back to table 2 and rollup the quantities conditionally with “where ‘most recent’ contains ‘most recent’” and use the "SUM(values) to add those quantities.

Table 1: quantities

Table 2

Does that helps you?

4 - Data Explorer

I missed the step of passing the date back to the original table to perform the match. Brilliant!

Thanks for your help, this solved my issue!