Forum Discussion
Sumif between dates in two different tables
- 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 ) )
Hi jdbuchanan71 ,
Thanks for the quick answer, the measurement works, with that i mean it does not return an error. Although it doesnt return anything.
I pasted the example with only two rows but i have a wide history of dates, what I need is for the measurement to be a rolling sum of all provisioned redemptions for the next 60 days for each soliciting date.
Here is what I used:
I beleive hte problem is in setting the starting date and the ending date
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
)
)- Anonymous7 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!