Forum Discussion
Anonymous
7 years agoNot applicable
Sumif between dates in two different tables
Hi Guys, I need help summing the values of a second table if they are in the next 60 days of a date in the first table. Its easiers ifi Show it: Table 1: SolicitingDate 01/01/2019 ...
- 7 years ago
It probably has something to do with where you are pulling the date fields in from and the joins in your model. When I test this measure and pull the date in from 'Solicitação Resgates' it works.
Total Redemptions next 60D = VAR StartingDate = MAX('Solicitação Resgates'[DataSolicitacao]) VAR EndingDate = StartingDate + 60 RETURN CALCULATE ( SUM ( 'Cotizações Resgates'[Solicitação Resgates.Financeiro Ajustado] ), FILTER ( 'Cotizações Resgates', 'Cotizações Resgates'[DataCotizacao] >= StartingDate && 'Cotizações Resgates'[DataCotizacao] <= EndingDate ) )
jdbuchanan71
Super User
7 years agoIt probably has something to do with where you are pulling the date fields in from and the joins in your model. When I test this measure and pull the date in from 'Solicitação Resgates' it works.
Total Redemptions next 60D =
VAR StartingDate = MAX('Solicitação Resgates'[DataSolicitacao])
VAR EndingDate = StartingDate + 60
RETURN
CALCULATE (
SUM ( 'Cotizações Resgates'[Solicitação Resgates.Financeiro Ajustado] ),
FILTER (
'Cotizações Resgates',
'Cotizações Resgates'[DataCotizacao] >= StartingDate
&& 'Cotizações Resgates'[DataCotizacao] <= EndingDate
)
)Anonymous
7 years agoNot applicable
ITS ALIVE!! JK,
Thanks very much it worked, i was pulling a datetime value, i changed to date and it worked!!
You are a genious!