Here is my data
Finance
I have chart that display monthly data
Like this
I need to do average for periods that are specified in another table.
Periods
So the end results should look like this
I know it should be a New Measure, but not sure how to write the DAX for that measure to do this averaging
I tried and ended with this, but it is not working
CALCULATE ( Average(Finance[Result]), FILTER ( ALL ( Periods), DATE ( Finance[Year], Finance[Month], 1 ) >= Periods[FromDate] && DATE ( Finance[Year], Finance[Month], 1 ) < Periods[ToDate] ) )
but this is does not work
Anyone know how to build the measure dax to do this?