• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Standard deviation of sum per month in PowerQuery Excel|Power Query|Excel Forum|My Online Training Hub

You are here: Home / Standard deviation of sum per month in PowerQuery Excel|Power Query|Excel Forum|My Online Training Hub

vba course banner

Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumPower QueryStandard deviation of sum per month…
sp_PrintTopic sp_TopicIcon
Standard deviation of sum per month in PowerQuery Excel
Avatar
Nick Eykens

New Member
Members
Level 0
Forum Posts: 2
Member Since:
February 5, 2020
sp_UserOfflineSmall Offline
1
April 21, 2020 - 5:24 pm
sp_Permalink sp_Print

Hello

I really like your video's and I hope you can help me with my problem.

I want to calculate the standard deviation of the sum per month in a Excel Power Pivot 2016 table. Now if I use the standard deviation it will take the standard deviation of the underlying tables. I want the standard deviations of the sums per month, so in this case: STDEV.P(63.75;38,13636364;20,54545455) with the result: 17,739.

Material Year_Month Som van Picks_Total Stdevp van Picks_Total  
795300 2019_11 63,75 #GETAL!  
  2019_12 38,13636364 #GETAL!  
  2020_01 20,54545455 #GETAL! desired result
Totaal 795300   122,4318182 0,018309092 17,739

I added the file in attachment and also a link to the file below. Thanks in advance.

http://www.mediafire.com/file/......xlsx/file

sp_AnswersTopicSeeAnswer See Answer
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4515
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
April 21, 2020 - 8:50 pm
sp_Permalink sp_Print sp_EditHistory

Hi Nick,

Welcome to our forum! Thanks for sharing your file. You can do this in Power Query (see Sources (2) in file attached) but it only has the ability to do the equivalent a STDEV.S formula i.e. standard deviation of a sample.

In Power Pivot we have STDEVX.P which is the equivalent of Excel's STDEV.P function, but  you need to first SUMMARIZE the data into a table that groups the data by material and month. I've added the following measures to your file:

Total Picks: =SUM(Sources[Picks_Total])

And

StdDev: =STDEVX.P(
SUMMARIZE(Sources,[Material],[Year_Month],"Grouped",[Total Picks]),
[Grouped])

Tip, you should move the Picks calculation to Power Query as this is more efficient than adding a calculated column in Power Pivot.

I hope that helps.

Mynda

sp_AnswersTopicAnswer
Answers Post
Avatar
Nick Eykens

New Member
Members
Level 0
Forum Posts: 2
Member Since:
February 5, 2020
sp_UserOfflineSmall Offline
3
April 22, 2020 - 3:37 pm
sp_Permalink sp_Print

Hi Mynda

 

This is exactly what I wanted. Thanks a lot!

Also, I'll use your tip in my current and future files!

 

Kind regards

Nick

Avatar
Steve Olson
Member
Members

Power Query

Power Pivot

Power BI
Level 0
Forum Posts: 25
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
4
April 26, 2020 - 4:07 am
sp_Permalink sp_Print

Mynda,

For various topics posted, I try to recreate the solutions offered.  I started with Nick's Nov, Dec and Jan data, and recreated going step by step after printing out the advanced editor from your Sources 2 query to see if I can get to the solution you posted.

In the process I had to duplicate the Sources 2 query after the add column step to get the Workday query. 

The question I have is that I don't really see in the Advanced Editor an indicator when you needed to duplicate the query.  When looking through this how do you know which queries are duplicated?

Thanks for your site and the many contributors.  Everyone is so generous,

 

Steve 

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4515
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
5
April 26, 2020 - 9:40 am
sp_Permalink sp_Print

Hi Steve,

It's great to see you're practicing using the examples here. I simply duplicated the Sources query to preserve Nick's original query, in case he wanted to refer back to it. 

Mynda

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Malcolm Sawyer
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 216
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Melanie Ford
Isaac Felbah
Adele Glover
Hitesh Asrani
Rohan Abraham
Anthony van Riessen
Erlinda Eloriaga
Abisola Ogundele
MARTYN STERRY
Rahim Lakhani
Forum Stats:
Groups: 3
Forums: 24
Topics: 6355
Posts: 27792

 

Member Stats:
Guest Posters: 49
Members: 32324
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.