Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mmcanelly
Helper I
Helper I

Best Practice for loading data into data model

I run into this issue all the time, and I wanted to see if anybody had any "best practices" for handling a situation like this.

 

I'm loading multiple tables from SQL Server. My fact table has ~1MM records. For each of the dimension tables, I want to filter them down when setting up the data model so that they only contain the dimensions that are present in the fact table. From my experience, I have 3 main ways I can accomplish this:

 

  1. Load all of the tables in as-is and use DAX to create new dimension tables that are filtered versions of the original. The minor downside to this approach is that I'm using more disk space than needed since I'm basically duplicating every table.
  2. Using PowerQuery, merge the fact table in to each dimension table with an inner join so that it filters the dimensions down to only those present in the fact table. My understanding from watching how the data loads when saving the model, though, is that it's loading the entire fact table for each merge. So if I have 6 dimension tables, it's loading the fact table 6 separate times so requires more processing time.
  3. Handle everything with views or queries in SQL Server so that I'm not doing any of the data modeling within Power BI.

My normal approach has been to use PowerQuery because it seems cleaner and easier to revert changes there. How are others handling this type of scenario?

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@mmcanelly Roche's Maxim would dictate:

  1. SQL Server
  2. Power Query
  3. DAX

That would be "best practice". That said, best practices are merely guidelines, there is generally a lot of nuance to them, like you favoring ease of reverting changes for example. I would say that if you run into issues with refreshes taking a long time then you might have to implement the DAX solution instead but otherwise, PQ is probably the say to go. It is kind of annoying how PQ handles this sort of thing though in terms of not seeming to cache the query load but doing it all over again each time. Referencing Power Query queries - Power BI | Microsoft Learn

 

That said, if you switch your Fact table load to a Dataflow, then you could potentially speed things up as the article above indicates.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
mmcanelly
Helper I
Helper I

@Greg_Deckler Thanks for the guidance and the article! That's very helpful. I've never messed around with dataflows, so I'll check that out if the load times end up being too much.

Greg_Deckler
Community Champion
Community Champion

@mmcanelly Roche's Maxim would dictate:

  1. SQL Server
  2. Power Query
  3. DAX

That would be "best practice". That said, best practices are merely guidelines, there is generally a lot of nuance to them, like you favoring ease of reverting changes for example. I would say that if you run into issues with refreshes taking a long time then you might have to implement the DAX solution instead but otherwise, PQ is probably the say to go. It is kind of annoying how PQ handles this sort of thing though in terms of not seeming to cache the query load but doing it all over again each time. Referencing Power Query queries - Power BI | Microsoft Learn

 

That said, if you switch your Fact table load to a Dataflow, then you could potentially speed things up as the article above indicates.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.