• 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

Counting / summing according to multiple criteria|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Counting / summing according to multiple criteria|General Excel Questions & Answers|Excel Forum|My Online Training Hub

vba course banner

Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
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 ForumGeneral Excel Questions & Answe…Counting / summing according to mul…
sp_PrintTopic sp_TopicIcon
Counting / summing according to multiple criteria
Avatar
Gigi Ion

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
February 10, 2020
sp_UserOfflineSmall Offline
1
February 10, 2020 - 4:30 am
sp_Permalink sp_Print
Good evening!
 I will bring to your attention the following problem:
- in the attached example file, in sheet 1, there would be a list of interventions made on some "machines", the defects found, the probable causes and the costs of the remedies ... The real file is the result of a database query and is much more complex, in meaning that there can be many more "defects" ...
 -in sheet 2 are grouped the parts involved in the respective defects on "subassemblies". These "subassemblies" do not appear as such in sheet 1. And the pieces, and the subassemblies are actually more ...
 My problem is to complete some centralizers, as I tried to sketch them in sheet 3:
 - counting the types of faults on each car. Here, if during an intervention it was acted on several parts of a subassembly, to count only once (eg: Ag5 from 01.01.2020, it was acted on the "ax" and on "bujie", both of the "motor" subassembly , is counted only once ...)
 - summary of costs. In this case, all the costs, broken down by "subassemblies" (in the above example "ax" and "bujie" ... must be added 140 to "motor" ...)
 Thanks!!!
sp_AnswersTopicSeeAnswer See Answer
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4524
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
February 11, 2020 - 11:19 am
sp_Permalink sp_Print

Hi Gigi,

Welcome to our forum. Thanks for sharing your file. It looks like the problem with your data is that it's not in a tabular format, which makes it difficult to summarise. I recommend you fix the layout, then you can use formulas like SUMIFS, COUNTIFS and PivotTables to aggregate the data they way you want.

In the file attached I've used Power Query to unpivot your data. Then I merged the tables in sheet2 with the unpivoted data to bring in the category information in. From there I can use a PivotTable to analyse the data.

Note: the defect and cauza columns in sheet1 contained no data so these were discarded in the unpivot. If your actual dataset has data in these columns then you may need to modify the query. If you'd like to learn more about Power Query you might like to consider my Power Query course.

Mynda

sp_AnswersTopicAnswer
Answers Post
Avatar
Gigi Ion

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
February 10, 2020
sp_UserOfflineSmall Offline
3
February 11, 2020 - 6:53 pm
sp_Permalink sp_Print
Thank you Mynda for your response. I try to follow the steps made by you on a real export, it worked until the phase with the merge of the queries (I don't have Pover BI yet). Now I have to do another job, but I'll get back to the topic soon.
Thank you again...
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4524
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
February 11, 2020 - 7:33 pm
sp_Permalink sp_Print

You're welcome! You don't need Power BI for this, you can do everything with Excel. In regards to the merge, you may have got the tables in a different order to mine, plus you need to choose the correct merge type in the merge dialog box. Best to look at my example.

Avatar
Gigi Ion

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
February 10, 2020
sp_UserOfflineSmall Offline
5
February 12, 2020 - 6:34 pm
sp_Permalink sp_Print
Hi, Mynda!
I applied your advice and  finally I succeeded, I completed the job.

I think by practicing a little more, it will be much easier for me!
Thanks again and wish you a good day!
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4524
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
6
February 12, 2020 - 9:22 pm
sp_Permalink sp_Print

Congratulations, Gigi! Practice is key 🙂

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Louis Muti
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: 218
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Blair Gallagher
Brandi Taylor
Hafiz Ihsan Qadir
Gontran Bage
adolfo casanova
Annestine Johnpulle
Priscila Campbell
Jeff Mikles
Aaron Butler
Maurice Petterlin
Forum Stats:
Groups: 3
Forums: 24
Topics: 6369
Posts: 27852

 

Member Stats:
Guest Posters: 49
Members: 32359
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.