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:
So what am I missing? All help appreciated.
Hi kylee_anne
Try this,
Calculate( Sum ( Sales), Filter ( 'Table', 'Table'[Date]= Max( 'Table'[Date]))
I hope I answered your question!
2 Replies
- Uzi2019Community Champion
Hi kylee_anne
Try this,
Calculate( Sum ( Sales), Filter ( 'Table', 'Table'[Date]= Max( 'Table'[Date]))
I hope I answered your question!
- FreemanZSuper Userhi 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]))