Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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
User | Count |
---|---|
20 | |
18 | |
17 | |
11 | |
7 |
User | Count |
---|---|
29 | |
28 | |
13 | |
12 | |
12 |