• 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

Records related to other records|Power Query|Excel Forum|My Online Training Hub

You are here: Home / Records related to other records|Power Query|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 ForumPower QueryRecords related to other records
sp_PrintTopic sp_TopicIcon
Records related to other records
Avatar
andrea alfano

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
October 18, 2019
sp_UserOfflineSmall Offline
1
October 18, 2019 - 6:48 pm
sp_Permalink sp_Print

I have a simple table with the quantity for each period of each Activity

TABLE OF QUANTITY

Activity Period Quantity
Activity1 1 150
Activity1 2 80
Activity2 5 70
Activity3 6 60

 

I have another table that list the rules to identify the Period and the quantity of other Activity (See Activity Related here below)

TABLE OF RULES

Activity Activity Related Period Related (Rule) Quantity Relate (Rule) COMMENTS
Activity1 Activity4 Period + 1 Quantity x 90%  
Activity2 Activity5 Period + 3 Quantity x 100%  
Activity4 Actitvity6 Period + 2 Quantity x 100% In this case the Activity6 takes the Period and the Quantity from the record above
Actitvity6 Actitvity7 Period + 3 Quantity x 80% In this case the Activity7 takes the Period and the Quantity from the record above

 

I have to generate another table to report the Period and the Quantity Related

TABLE OUTPUT

Activity Related Period Related Quantity Related
Activity4 2 135
Activity5 8 70
Activity6 4 135
Activity7 7 108

Thank you very much for your support

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4449
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
October 19, 2019 - 9:43 am
sp_Permalink sp_Print

Hi Andrea,

Welcome to our forum! 

It's not logical to sometimes refer to the row above and sometimes not. Rules need to be consistent. In the attached file you'll see I simply changed the rules for activity 6 and 7 so that they reference activity 1, rather than going via rules 4 and 6.

I hope that points you in the right direction.

Mynda

Avatar
andrea alfano

Active Member
Members
Level 0
Forum Posts: 5
Member Since:
October 18, 2019
sp_UserOfflineSmall Offline
3
October 19, 2019 - 7:01 pm
sp_Permalink sp_Print

Thank you very much Mynda, your forum is really helpful.

Please excuse me if I bother you, but I have to say that I can't understand why the rules are not consistent

Probably I was not clear in my previous statement.

I have a simple table like that.

Activity Period (Month) Quantity
A 7 11
X 8 27

 

I have another table like that

Activity Activity Related Period Related (Rule) Quantity Relate (Rule)
A B 1 90%
B C 3 100%
C D 3 100%
X Y 6 80%
Y Z 8 100%
Z K 9 90%

 

Via a mathematical relation like that (Example):

Period --> D (for example) = (A) 7 + (B) 1 + (C) 3 + (D) 3 = 14

Quantity --> Z (for example) = (X) 8 * (Y) 80% * (Z) 100% = 21,6

So there is a mathematical rule for each step with which I’d l like to build a table like:

Activity Related Period Related (Rule) Quantity Relate (Rule)
B 8           9,90
C 11           9,90
D 14           9,90
Y 11         21,60
Z 17         21,60
K 25         19,44

Thank you very very much for all your help (and sorry for my poor english).

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Kim Knox, Kevin Lenahan
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
Jessica Stewart: 204
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Maria Conatser
Jefferson Granemann
Glen Coulthard
Nikki Fox
Rachele Dickie
Raj Mattoo
Mark Luke
terimeri dooriyan
Jack Aston
AndyC
Forum Stats:
Groups: 3
Forums: 24
Topics: 6221
Posts: 27285

 

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