Forum Discussion
sandeep_potturi
1 year agoFrequent Visitor
How to find the Average before a date??
Hi all, so i have this table and all i want to do is find the average BEFORE 02/07/2025. A Hardcoded date to make things simple. so in this example for MC 543, i want the average of the numbe...
- 1 year ago
Hi sandeep_potturi - can you please try the below logic and pass the 543 (static cutoff).
Average Before Cutoff =
VAR CutoffDate = DATE(2025, 2, 7)
RETURN
AVERAGEX(
FILTER(
YourTable,
YourTable[Date] < CutoffDate &&
YourTable[MC] = 543
),
YourTable[Value]
)Hope this helps.
AlexTheGreat
Resolver II
1 year agoHi,
You can add a filter to your average measure.
AVG_Before =
CALCULATE(
AVERAGE([Value]),
Date[Date] < DATE(2025, 7, 2),
Hope it helps!