Forum Discussion
Improve PowerBI performance for big datasets
- 1 year ago
sebasj Well, your other option is to try to eliminate columns in your imported data that you are not using. Focus on high cardinality columns (lots of unique values) That is going to increase the size of your data model. For example, if you have columns for "Units" and "Cost Per Unit" as well as "Total Cost", consider eliminating the "Total Cost" column and using a measure for that calculation instead. This will save on your data model size.
The other thing you can do that can sometimes reduce a model by leaps and bounds is to turn off Auto Time Intelligence. If you have lots of date columns in your data, a separate date table gets created for each and that can blow-up your data model tremendously.
In terms of migrating from text files to SQL. You can import the data into SQL and then you just need to modify your query in you semantic model to point to the SQL Server for the data instead of the text file. You can do this one at a time. The easiest thing to do would be to create a brand new query that connects to your data in SQL Server and transforms it the way you want. Then you use Advanced Editor to copy all of the M code. Now, open your original query with Advanced Editor and replace everything with this copied code. Save the query, delete the temporary query you created and save and apply. You original table that retrieved data from the text file will now get it from SQL Server and nothing in your model will break.
Well while this is marked as solved, it isn't sadly, we still are testing.
In the meantime, if someone knows if there's a way to easily change a model from Import to DirectQuery would be great. I searched the forum but didn't find anything meaninful, the ones I found are from a couple years ago and most say that you need to start from scratch almost.
Perhaps there's now an easier way which I'm not aware, because the model is pretty complex and redoing it would take some serious time.
Thanks again!
Seb