• 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

Data model reusing the same key|Power Query|Excel Forum|My Online Training Hub

You are here: Home / Data model reusing the same key|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 QueryData model reusing the same key
sp_PrintTopic sp_TopicIcon
Data model reusing the same key
Avatar
Erik Halkjaer
Member
Members
Level 0
Forum Posts: 35
Member Since:
March 18, 2020
sp_UserOfflineSmall Offline
1
April 15, 2022 - 5:49 pm
sp_Permalink sp_Print sp_EditHistory
Hi Mynda and Phil
I have made a file with simple mockup data and in two sheets trying to show to show you my challenge and my idea of a solution, when the key data is the same in every data source.

Only the "case #" is a common denominator - each of the files contains data from different steps in the work proces, and data format can be text, names, dates, costs, numbers and status.

Data are extracted as *.xlsx or *.csv files from QlikView and cannot be modified in QlikView.

Data will be updated in QlikView daily and in the Excel Power Query solution ( Dashboard ) on a weekly basis.

My place of work is a public institution, and Excel 2016 is the only "tool" available.

I have made a lot of other reports, dashboards and solutions using Power Query and in a number of cases used data modelling, but here it turns out to be a major problem to create a data model, because case# is key in all of the source data files.

In short - my idea is to add a column to each of the underlying files with a copy of the case # - e.g. "A_Case #", "B_Case #"..... and in the main file create a number of columns - all containing the case # with a preceeding letter to be able to make connections to each of the underlying files.

I hope you can will evaluate my idea and give it a go or maybe give me an alternative solution.

 

Thank you

Erik

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1810
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
2
April 16, 2022 - 4:19 pm
sp_Permalink sp_Print sp_EditHistory

Hi Erik,

It's not clear what you want to do: you want to  combine all source files, or to  add each source file  as a different table in the data model  to process data with Power Pivot?

Will be much clear if you can show an example with how the final data should look like, we will be able to provide a solution to get to that output.

Avatar
Erik Halkjaer
Member
Members
Level 0
Forum Posts: 35
Member Since:
March 18, 2020
sp_UserOfflineSmall Offline
3
April 18, 2022 - 6:35 am
sp_Permalink sp_Print

Hi Catalin

I want to combine all data source files with my main file and take parts of data from these in Power Pivot and charts.

Erik

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1810
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
4
April 18, 2022 - 1:58 pm
sp_Permalink sp_Print

Hi Erik,

Try this solution:

https://www.excel-first.com/co.....wer-query/

Avatar
Erik Halkjaer
Member
Members
Level 0
Forum Posts: 35
Member Since:
March 18, 2020
sp_UserOfflineSmall Offline
5
April 18, 2022 - 10:52 pm
sp_Permalink sp_Print

Hi Catalin

Thanks - but this is not the issue with my data sources.

They consist of up to 12 different data files with different contents, and only the "Case #" is unique and a common denominator for all source files.

That is the reason for my possible solution with copying the Case# collumns and rename it "A-Case#", "B-Case#" and so on in the main file. And in each of the source files pick one of the headlines, so that each source file has got a unique key, that can be used to form a data model.

How does that sound to you or others reading this ?

Erik

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1810
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
6
April 19, 2022 - 1:30 am
sp_Permalink sp_Print sp_EditHistory

If you combine the files with the solution described in the link, you will get data like this:

Screenshot-2022-04-18-170246.pngImage Enlarger

Isn't that what you want? You said that you want to combine data from folder.

you're saying that you want to form a data model.

Let me ask again:

you want to combine all source files, or to add each source file as a different table in the data model to process data with Power Pivot?

sp_PlupAttachments Attachments
  • sp_PlupImage Screenshot-2022-04-18-170246.png (64 KB)
Avatar
Erik Halkjaer
Member
Members
Level 0
Forum Posts: 35
Member Since:
March 18, 2020
sp_UserOfflineSmall Offline
7
April 20, 2022 - 4:57 am
sp_Permalink sp_Print

Hi Catalin

I am not going to combine the data source files in Power Query - only in the data model. With unique column headers  ( copying the case# and adding for instance "A_" should do the trick - I hope.

Doing that I hope to be able to take data from the different data source tables into Power Pivot and create reports.

Erik

Avatar
Catalin Bombea
Iasi, Romania
Admin
Level 10
Forum Posts: 1810
Member Since:
November 8, 2013
sp_UserOfflineSmall Offline
8
April 20, 2022 - 4:07 pm
sp_Permalink sp_Print

Hi Erik,

There is no such thing as combining data in data model, in data model there will be individual tables and you can create relationships between tables.

You need to organize the data model in a star schema, but for this you have to create a dimension table - a list of unique Case # that will be the center of your model, all data sources will be related to this unique list of case #. The reason for this is that all your fact tables you have may contain duplicate case #.

Avatar
Erik Halkjaer
Member
Members
Level 0
Forum Posts: 35
Member Since:
March 18, 2020
sp_UserOfflineSmall Offline
9
April 21, 2022 - 4:38 am
sp_Permalink sp_Print

Hi Catalin

That is what I have been trying to suggest - maybe in other words - but this was my idea.

Guess you agree with me, that it can be done this way.

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Sonja Mason, Alexandra Radu, Denise Lloyd
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
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Raj Mattoo
Mark Luke
terimeri dooriyan
Jack Aston
AndyC
Denise Lloyd
michael serna
mashal sana
Tiffany Kang
Leah Gillmore
Forum Stats:
Groups: 3
Forums: 24
Topics: 6219
Posts: 27276

 

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