I have a tableA: Therin I have a Date-column (Date) an 1 column with values (Value).
TableA is connected to a calendar (calendar). In the the calendar I have a measureA to show the date in the x-axis only until the last full calender week.
Additonally, I use the filter in the filter panel to exclude dates before 2021.
Now my problem:
I want to calculate the average of the column „Value“ from 01.01.2021 till the last full calender week to show a linear line with the average value in the graphic.
I tried it with: Average = CALCULATE(AVERAGEX('tableA', 'tableA'[Value]), ALLSELECTED(calendar[measureA]))
I get the correct average value as total sum (35), but not for every date. I need the same average value (35) for every date to show the linear average line. And it is important, that my filter (in the filter panel) and my meassure are still active.
Thank you very much