Forum Discussion
kylee_anne
1 year agoHelper II
Calculate using date filter
Hi, I'm trying to this: But I can't and don't understand why. I'm trying to sum to a certain reporting date which changes and so can't be hard coded. This is the DAX I have for it: ...
- 1 year ago
Hi kylee_anne
Try this,
Calculate( Sum ( Sales), Filter ( 'Table', 'Table'[Date]= Max( 'Table'[Date]))
I hope I answered your question!
FreemanZ
1 year agoSuper User
hi kylee_anne ,
It is not allowed to reference a measure in a predicate filter argument - a simple equation. We need to write in its complete form with FILTER.
try like:
Earned =
CALCULATE(
SUM(data[hours]),
FILTER(
data,
data[date] = [Reporting Period]
)
)