Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello everyone. How it's going?
I need to create an avarage of the requests made of the last 7 days.
Each line of the table is a request.
The collum "Prazo separacao" is my date.
Please, who can help me?
hi @Lucasr46
it depends on the starting point of last 7 days, if you mean Today/Now, try like:
Hi @Lucasr46 ,
Use this measure:
Measure =
VAR _MAXDATE =
CALCULATE ( MAX ( RequestTable[Date] ), ALL ( RequestTable ) )
RETURN
DIVIDE (
CALCULATE (
SUM ( RequestTable[Request] ),
FILTER (
RequestTable,
RequestTable[Date] <= _MAXDATE
&& RequestTable[Date] >= _MAXDATE - 6
)
),
CALCULATE (
COUNTROWS ( VALUES ( RequestTable[Date] ) ),
FILTER (
RequestTable,
RequestTable[Date] <= _MAXDATE
&& RequestTable[Date] >= _MAXDATE - 6
)
)
)
If this answer solves your problem, give it a thumbs up and mark it as an accepted solution so the others would find what they need easier.
Regards,
Loran