• 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
  • Login

Multiple fact tables|Power Pivot|Excel Forum|My Online Training Hub

You are here: Home / Multiple fact tables|Power Pivot|Excel Forum|My Online Training Hub
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 ForumPower PivotMultiple fact tables
sp_PrintTopic sp_TopicIcon
Multiple fact tables
Avatar
MJ Thulasi
Member
Members
Level 0
Forum Posts: 33
Member Since:
November 27, 2020
sp_UserOfflineSmall Offline
1
August 15, 2021 - 10:48 am
sp_Permalink sp_Print

Hi

I have two transaction tables

1. Table A - Date, Batch number, Sales

2. Table B - Date, Batch number, Product, Discount

I want to create pivot table with product wise sales and discount.  Unfortunately Product column is not in Table A which has sales values.

I dont want to merge two tables as the data is huge.

Can I achieve the result without merging the tables?  Pls suggest.  Thanks

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 880
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
2
August 15, 2021 - 5:33 pm
sp_Permalink sp_Print

Hello,

Create a third table containing unique batch numbers, then create relationships.

Table A * —— 1 Table C
Table B * —— 1 Table C

Br,
Anders

Avatar
MJ Thulasi
Member
Members
Level 0
Forum Posts: 33
Member Since:
November 27, 2020
sp_UserOfflineSmall Offline
3
August 15, 2021 - 10:09 pm
sp_Permalink sp_Print

Hi

 

Thanks for the reply. 

Yes, I created a third table with unique batch numbers.

I want product wise sales.  Product column is not in Table A - fact table, which contains sales value.

So I am unable to pull that sale info by product wise.

I need a report like this:

Product

  Batch No.           Sales      Discount

Hope I am clear.

Thulasiraman

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 880
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
4
August 16, 2021 - 7:19 pm
sp_Permalink sp_Print

Hello,

Can you attache a file with sample data, as it is now I am just guessing how your data looks like.

Br,
Anders

Avatar
MJ Thulasi
Member
Members
Level 0
Forum Posts: 33
Member Since:
November 27, 2020
sp_UserOfflineSmall Offline
5
August 17, 2021 - 6:02 pm
sp_Permalink sp_Print

Hi

I am attaching a sample which I hope will elaborate my queries.

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 880
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
6
August 17, 2021 - 9:27 pm
sp_Permalink sp_Print sp_EditHistory

Hello,

Relations in Power Pivot is not the same as relations in a relational database. I have made some adjustments, in so making Table B a fact table and added Tables C and D as dimension (lookup) tables, see attached file.

Table A[Process] and Table B[Process] has a many to one relationship with Table C[Process].
Table A[Lot No] and Table B[Lot No] has a many to one relationship with Table D[Lot No].

When building the Pivottable you add Process from Table C and Lot No from Table D in the Rows section and then you add the Sales from Table A and the Cost from Table B in the Values section.

I hope this gives the answer to your query.

Br,
Anders

Avatar
MJ Thulasi
Member
Members
Level 0
Forum Posts: 33
Member Since:
November 27, 2020
sp_UserOfflineSmall Offline
7
August 18, 2021 - 10:02 am
sp_Permalink sp_Print

Hi

 

Thanks for your reply and info.  It seems that you have added "Process" column in Table B manually.

And then created two tables - C and D - with Lot No and Process as master files.

Adding the process column manually in Table B is herculean task as it contains thousands of rows!

Is there any other way to accomplish this?

Thanks

Thulasi

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4614
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
8
August 18, 2021 - 11:09 am
sp_Permalink sp_Print

Hi Thulasi,

You can and should be using Power Query to get your data and load it into Power Pivot. In Power Query you can create queries to extract distinct lists of Processes and Lot Numbers automatically, so that it's not a herculean task.

You can learn Power Query here.

Mynda

Avatar
MJ Thulasi
Member
Members
Level 0
Forum Posts: 33
Member Since:
November 27, 2020
sp_UserOfflineSmall Offline
9
August 19, 2021 - 12:22 pm
sp_Permalink sp_Print

Hi

Ok thanks.

Rgds

Thulasi

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Philip Treacy, Susan VanRiper, Yiwen Zhou, QSolutions Group
Guest(s) 8
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
jaryszek: 183
Newest Members:
Herbie Key
Trevor Pindling
Stevan Kanjo
Erin Sheldon
Nikita Bhatia
Sheilah Taylor
Clare Webber
David Jenssen
Dominic Brosnahan
Young You
Forum Stats:
Groups: 3
Forums: 24
Topics: 6526
Posts: 28576

 

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

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel Office Scripts
  • 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

Sign up to our newsletter and join over 400,000
others who learn Excel and Power BI with us.

 

Company

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

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.