Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community,
I have two tables linked by the CAMPO field:
Table 1: CONTEO
CAMPO, INVERNADERO, FECHA_ALTA, FECHACORTE, etc.Table 2: Forecast_Clima_VAL
CAMPO, FECHA_CLIMA, VAL (daily numeric values)
| CAMPO | FECHA_CLIMA | VAL |
|---|---|---|
| SONORA | 08/08/2025 | 1.5 |
| SONORA | 09/08/2025 | 1.0 |
| SONORA | 10/08/2025 | 2.0 |
| ... | ... | ... |
| SONORA | 05/10/2025 | 1.5 |
Objective: I need to calculate the date when the cumulative sum of VAL reaches 80, starting from FECHA_ALTA of each record in CONTEO.
Expected example:
What already works: This expression correctly sums VAL in a range:
Sum(
Aggr(
If(FECHA_CLIMA >= FECHA_ALTA AND FECHA_CLIMA <= FECHACORTE, VAL),
FECHA_CLIMA, FECHA_ALTA, FECHACORTE
)
)
This expression returns the total from FECHA_ALTA:
=Sum({<FECHA_CLIMA={">=$(=FECHA_ALTA)"}>} VAL)
Constraints:
Question: Is it possible to calculate this with an expression in a chart?
I appreciate any guidance.
Hi, I don't know what's the expected result, the example only has one CAMPO and INVERNADERO, if it helps.
If(
Sum(
Aggr(
If(FECHA_CLIMA >= FECHA_ALTA AND FECHA_CLIMA <= FECHACORTE, VAL),
FECHA_CLIMA, FECHA_ALTA, FECHACORTE
)
)>60 and
Sum(
Aggr(
If(Above(FECHA_CLIMA) >= Above(FECHA_ALTA) AND Above(FECHA_CLIMA) <= Above(FECHACORTE), Above(VAL)),
FECHA_CLIMA, FECHA_ALTA, FECHACORTE
)
)<60
,FECHACORTE)Will write the date when the accumulate changes.
If there is a fixed formula since FECHA_ALTA, it will be better the have precalculated values using the script, that would make the measures a lot easier to calculate.