+ Reply to Thread
Results 1 to 5 of 5

To load into data model or not

  1. #1
    Registered User
    Join Date
    10-18-2019
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Office 365
    Posts
    7

    To load into data model or not

    Dear all,

    Another question I can't seem to really find an answer to.

    I've got some queries based upon local files and external large data sets through ODBC.

    In power Query I delete unnecessary rows, do some calculations in added columns, merge various tables to enrich the local file with the data I want, and then load the one query which totals the wanted dataset as a flat table into Excel.

    Obviously I create a connection only, however, should or should I not load all the data into the datamodel? I'm not creating any pivot tables from this data, so is there any use to load it into the data model?

    Is there any use for the data model if you don't plan to use a pivot table?

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: To load into data model or not

    You can use the data model to create relationships between tables, and create Measures (custom calculations); then you can report on these using Pivot Tables / CUBE functions.

    If all you need to do is materialise your queried data to a table, then no, there's no value in loading to Data Model (but it does make me wonder what you ARE doing with it!)
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    10-18-2019
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Office 365
    Posts
    7

    Re: To load into data model or not

    Hi Olly,

    Thanks for your answer. Well, the queried data does get merged, filtered, etc, they contain 100.000's of rows, so loading it directly into Excel is a bad idea.

    I suppose there's a hidden hint/question in your last part. Is that regarding the data in this particular case, or with data models in general?

    Or to put it differently, is it a mistake from my part thinking a flat table from queries and merges after Power Query is a solid solution, instead of making use of power pivots, DAX, and data models?

    I see it as follows, use PQ to setup the data, then either use Excel or Power Pivot to further work on this. I acknowlegde it's probably a shortcoming that I know my way 'faster' in Excel than in Power Pivot, so I'm more likely to use flat tables after all. Is this what you're hinting at?

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: To load into data model or not

    Yes. In general - materialising all the data on a worksheet is usually not the most efficient way of handling it.

    What do you actually DO with the data next, after importing, merging, transforming, etc? It's rare that a big flat table is the actual required output - it's far more common that users want to aggregate / interrogate that data in some way, and in that case, using the data model is nearly always more efficient.

    Hard to give specific advice without a specific workbook / use case, though

  5. #5
    Registered User
    Join Date
    10-18-2019
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Office 365
    Posts
    7

    Re: To load into data model or not

    Hi Olly, It's hard to really post examples since it's a data jungle.

    To actually tell what I am doing; We've multiple businesses run by different people. Our business is a wholesaler, and the other one is a webshop B2C.

    Now the webshop really has no data integrity, it's a mess. They've multiple GTIN/EAN coupled per SKU, whereas we actually have one SKU per GTIN/EAN.

    So I need to join these together to add their information from multiple data tables to our productsheet, from where I can extract information from their online scrapers etc.

    But I just tried to use a DAX formula in the data model, as I thought it was PIVOT only, and even in a flattable, it works. So I start to see where my short comings actually are, I should stop making unnecessary joins in PQ, and indeed make relationships.

    I suppose I should use PQ to really cut down on unnecessary data and model the data to be able to relate all the tables in the data model. This is what I was doing in PQ instead.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Add this data to the Data Model addition needed to current pivot table code
    By SarahPintal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-02-2017, 06:52 PM
  2. Replies: 0
    Last Post: 05-30-2017, 04:48 PM
  3. Forecast model for load/delivery system
    By Santa1986 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-25-2015, 04:27 PM
  4. Replies: 0
    Last Post: 03-26-2015, 10:37 AM
  5. How to make a time period a variable for this model? (automating the model)
    By pigment01 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-17-2015, 12:47 PM
  6. VBA Model : Two Stage Gordon Model
    By elaph in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-29-2014, 11:37 AM
  7. Create a model that will generate a column of numbers based on model parameters
    By tncanoeguy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2013, 05:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1