Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I'm using Power Pivot and I need to compute the average of N last values, here N = 28 and is based on index column. Basically, I want to have the 28 last values from MAX index to (MAX index - 28)
I tired this :
AVG 4 Last week new shoppers:=CALCULATE(AVERAGE(Sweden[New shoppers]);FILTER(Sweden; MAX(Sweden[Index]) && MAX(Sweden[Index]) - 5))
But even if i change the N value (28 to 5 for example), the average is the same...
Do you have any idea?
Solved! Go to Solution.
hi @GeoffreyLou
i tried with a simplified dataset:
ceated a measure with such code:
you can change 5 to 28 in your real case.
hi @GeoffreyLou
i tried with a simplified dataset:
ceated a measure with such code:
you can change 5 to 28 in your real case.
Working like a charm, many thanks !
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
45 | |
31 | |
30 | |
18 | |
17 |