• 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
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

How to compare sales for two groups families with one kid and families with two kids|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / How to compare sales for two groups families with one kid and families with two kids|General Excel Questions & Answers|Excel Forum|My Online Training Hub
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 ForumGeneral Excel Questions & Answe…How to compare sales for two groups…
sp_PrintTopic sp_TopicIcon
How to compare sales for two groups families with one kid and families with two kids
Avatar
Jim Chen
Member
Members

Power BI
Level 0
Forum Posts: 54
Member Since:
February 20, 2019
sp_UserOfflineSmall Offline
1
October 11, 2019 - 7:07 am
sp_Permalink sp_Print sp_EditHistory

Mynda,

 

I have a sales table with row index such as 1, 2, 3, 3, 4, 5, 5, 6, 7, 8,, 9,10, 11, 11, 12, 12, 13, 14, 15..... (please see the attachment)

Each number denotes a child. The duplicates mean families with two kids while non-duplicates mean families with one kid. 

How can I group them with Power Query? Or How can I use Pivot Table to group sales for families with one child and families with two kids? What is the best way to do it?

 

Thanks!

 

Jim

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4448
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
October 11, 2019 - 10:39 am
sp_Permalink sp_Print

Hi Jim,

You can do this easily with a PivotTable. Put the 'Kids' field in both the Rows and Values area of the PivotTable. Set the field in the Values area to Count instead of Sum.

If you want to filter just those with 2 or more kids then you can also do so in the PivotTable. Similarly you could just sort the data, however you weren't clear on how you wanted the end result to look.

Mynda

Avatar
Jim Chen
Member
Members

Power BI
Level 0
Forum Posts: 54
Member Since:
February 20, 2019
sp_UserOfflineSmall Offline
3
October 12, 2019 - 2:27 am
sp_Permalink sp_Print

Mynda,

Thanks for your help. It works. How can I further group them into two groups (1 kid families & two kids families) with their respective revenues and their respective number of kids? Please see the attachment for clarification. 

 

Jim

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4448
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
October 12, 2019 - 9:35 am
sp_Permalink sp_Print

Hi Jim,

You need to add a helper column to the source data that classifies the kids into 1 or 2 kid families. See attached.

Mynda

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Velouria, Riny van Eekelen, Alexandra Radu, michael serna
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
michael serna
mashal sana
Tiffany Kang
Leah Gillmore
Sopi Yuniarti
LAFONSO HERNANDEZ
Hayden Hao
Angela chen
Sean Moore
John Chisholm
Forum Stats:
Groups: 3
Forums: 24
Topics: 6216
Posts: 27250

 

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