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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Calculate standard deviation from sum of cost per month

Hello Everyone,

 

I am trying to calculate the standard deviation of sum of cost for a specific Id over months.

What I would like in my dashboard is to have a table with IDs as rows and STD value over months.

 

Here is an example of the data I am having.

 

dd.PNG

 

Here is the Dax formula i'm trying to use but it seems its calculating the STD Over all costs and its not summing them per month

STD = CALCULATE(STDEV.S(Costs[Cost]), FILTER(Costs, Costs[Date].[Month]))

 

Can anyone help me solving this problem I am facing,

 

Thanks !

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

The dates are grouped by the following way. Try below formula:

STD = 
CALCULATE (
    STDEV.S ( Costs[Cost] ),
    FILTER ( ALL ( Costs ), Costs[Date].[Month] = MAX ( Costs[Date].[Month] ) )
)

vhenrykmstf_0-1669110181419.png

 

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
v-henryk-mstf
Community Support
Community Support

Hi @Anonymous ,

 

The dates are grouped by the following way. Try below formula:

STD = 
CALCULATE (
    STDEV.S ( Costs[Cost] ),
    FILTER ( ALL ( Costs ), Costs[Date].[Month] = MAX ( Costs[Date].[Month] ) )
)

vhenrykmstf_0-1669110181419.png

 

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors