Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Ortignano
Helper II
Helper II

Problem with STDEV

Hello,

I have  a table with error and week ID reference. I create a visual like below:

 

Error    Last7DaysError    STDEV_of_last12_week

Err 1

Err2

..

Err n

 

And I try to calculate the standard deviation of each err over the last 12 weeks using

 

STDEV_of_last12_week = STDEVX.P(FILTER(ALL('Calendar'),
'Calendar'[WeekID]<=MAX('Calendar'[WeekID]) &&
'Calendar'[WeekID]>=MAX('Calendar'[WeekID])-11
),
[CountError]
)
 
but comparing with the same table in excel it doesn't give me the correct result. I don't if I'm make some error in claculation
Thank you
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Ortignano , 12 weeks calculation seems correct try with a table having the measure or some grouping of table using values or summarize

 

example

STDEV_of_last12_week = calculation( STDEVX.P(Table, [CountError]) ,FILTER(ALL('Calendar'),
'Calendar'[WeekID]<=MAX('Calendar'[WeekID]) &&
'Calendar'[WeekID]>=MAX('Calendar'[WeekID])-11 )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Ortignano , 12 weeks calculation seems correct try with a table having the measure or some grouping of table using values or summarize

 

example

STDEV_of_last12_week = calculation( STDEVX.P(Table, [CountError]) ,FILTER(ALL('Calendar'),
'Calendar'[WeekID]<=MAX('Calendar'[WeekID]) &&
'Calendar'[WeekID]>=MAX('Calendar'[WeekID])-11 )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you Amitchandak, it was my fault:  I didn't use a summarized table.

 

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.