Forum Discussion
markyochoa
3 years agoHelper I
Custom Days Between Measure not working
I have an independent calendar that I use for most calculations involving dates. It's a simple 1-column table with dates from 1/1/2021 - 12/31/2023. I'm sure almost everyone is familiar with this pra...
- 3 years ago
markyochoa Looks like it has to do with the evaluation of the measures within the FILTER clause, do this instead:
Days = VAR __Begin = [BeginningMonth] VAR __Selected = [SelectedDate] VAR __Table = FILTER( 'Dates', [Date] >= __Begin && [Date] <= __Selected) VAR __Result = COUNTROWS(__Table) RETURN __Result
Greg_Deckler
3 years agoCommunity Champion
markyochoa Looks like it has to do with the evaluation of the measures within the FILTER clause, do this instead:
Days =
VAR __Begin = [BeginningMonth]
VAR __Selected = [SelectedDate]
VAR __Table = FILTER( 'Dates', [Date] >= __Begin && [Date] <= __Selected)
VAR __Result = COUNTROWS(__Table)
RETURN
__Resultmarkyochoa
3 years agoHelper I
Thanks!!!!