Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
All,
I am new to powerBI and DAX and was trying to calculate 5 weeks moving average and standard deviation. earlier I was doing everything in excel.
below are the observations for the last 5 weeks and calculations done in excel:
wdate | Applications submit | Average | Stdv.p |
1/4/2020 | 24720255 | ||
1/11/2020 | 21756257 | ||
1/18/2020 | 18802997 | ||
1/25/2020 | 17686517 | ||
2/1/2020 | 17586526 | 20110510.5 | 2753690 |
in power BI, the average comes out to be correct but STDV.P output is not matching
2/1/2020 -
stdv.p = 993908
I have used the below formula for both average and standard deviation:
Solved! Go to Solution.
Hi. Your measures are overly complicated which is what's causing the error. Try these...
Average Applications Submitted:=AVERAGE([Applications submit])
Standard Deviation Applications Submitted:=STDEV.P(Data[Applications submit])
Five Week Moving Average:=CALCULATE(
[Average Applications Submitted],
DATESINPERIOD(
'Calendar'[Date],
LASTDATE('Calendar'[Date]),
-35,
DAY
)
)
Five Week Moving Standard Deviation:=CALCULATE(
[Standard Deviation Applications Submitted],
DATESINPERIOD(
'Calendar'[Date],
LASTDATE('Calendar'[Date]),
-35,
DAY
)
)
Checking the calculations against Excel...
What's in yellow is cutting and pasting your data. Orange is me verifying the calculations in Excel. Green is using the average and standard deviation measures above. Hope this helps!
Hi. Your measures are overly complicated which is what's causing the error. Try these...
Average Applications Submitted:=AVERAGE([Applications submit])
Standard Deviation Applications Submitted:=STDEV.P(Data[Applications submit])
Five Week Moving Average:=CALCULATE(
[Average Applications Submitted],
DATESINPERIOD(
'Calendar'[Date],
LASTDATE('Calendar'[Date]),
-35,
DAY
)
)
Five Week Moving Standard Deviation:=CALCULATE(
[Standard Deviation Applications Submitted],
DATESINPERIOD(
'Calendar'[Date],
LASTDATE('Calendar'[Date]),
-35,
DAY
)
)
Checking the calculations against Excel...
What's in yellow is cutting and pasting your data. Orange is me verifying the calculations in Excel. Green is using the average and standard deviation measures above. Hope this helps!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
11 |