Forum Discussion
stw
2 years agoNew Member
Cannot calculate rolling 6 week average
Hello all. I am fairly new to Power BI, but I have managed some basic things already. My problem at the moment is as follows: I am using the following tables: date table (date, iso_week, year, mo...
rajendraongole1
2 years agoSuper User
Hi stw - can you try below measure for week
Rolling_6W_Avg_RQ =
CALCULATE(
AVERAGE('DAX'[Repair_Quote]),
DATESINPERIOD(
Dim_Datum[Date],
LASTDATE(Dim_Datum[Date]),
-6,
WEEK
)
)
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
stw
2 years agoNew Member
Unfortunately, WEEK is not a valid argument. Only DAY MONTH YEAR QUARTER are available.
Also, changing the function from
AVERAGEX('DAX','DAX'[RQ])to
AVERAGE(DAX[RQ])gives me an error saying
"column RQ was not found in table dax or cannot be used here"
Maybe there is a problem with the date table and/or the connections between the tables and the calculated measure?