Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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 !
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
23 | |
21 | |
20 | |
14 | |
12 |
User | Count |
---|---|
43 | |
31 | |
24 | |
22 | |
22 |