# Re: Create a condition with a Date field

Solved
1898 0
cancel
Showing results for
Did you mean:
5 - Automation Enthusiast

Hi,

For each record, I have a start date (Date de parution) and an end date (Date 6 mois). They unique to every record.
I want to count how many we have sold of every record within those date (Sales are in the Ventes 2021 tab, which is already link to my working tab).
I cannot filter by a Date field, it seems. How can I work around this?

Thank you

1 Solution

Accepted Solutions
18 - Pluto

Hi Veronique, would the following work?

1. We create rollup fields in `Ventes 2021` of both `Date de parution` and `Date 6 mois`
2. In `Ventes 2021`, we create a formula field that checks whether the record’s `Date` value is between the rolled up values of `Date de parution` and `Date 6 mois` from the previous stem
3. In the `Titres` table, we modify `Ventes 6 mois`’s to conditionally filter on the formula field from step 2?
4 Replies 4
18 - Pluto

Hi Veronique, would the following work?

1. We create rollup fields in `Ventes 2021` of both `Date de parution` and `Date 6 mois`
2. In `Ventes 2021`, we create a formula field that checks whether the record’s `Date` value is between the rolled up values of `Date de parution` and `Date 6 mois` from the previous stem
3. In the `Titres` table, we modify `Ventes 6 mois`’s to conditionally filter on the formula field from step 2?
5 - Automation Enthusiast

What would be the formula for .2? I’m trying a SUMIF but it doesn’t seem to work.

Thank you so much!

Hi Veronique, I would use this formula:

``````IF(
AND(
Date <= {End Date (from Titres)},
Date >= {Start Date (from Titres)}
),
1
)
``````

I’ve also set it up here for you to have a look at

To view the formulas, you can duplicate the base by clicking the title of the base at the top of the screen, then the three horizontal dots on the right, and then the “Duplicate Base” button.

5 - Automation Enthusiast