Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello,
I have a very large csv database and I'd like to import only 10% of the observations, keeping all the columns and variables the same. Is there a way to randomly select and load a sample of the database? Thank you.
Solved! Go to Solution.
Yes, you can use Power BI to randomly select and load a sample of your database. Here's one way to do it:
In Power BI Desktop, select "Get Data" from the Home ribbon and then select "Text/CSV" as the data source.
In the "Import Data" dialog, select your CSV file and then click "Transform Data".
In the Query Editor, click the "Sample" button in the "Transform" tab of the ribbon.
In the "Sample" dialog, select the "Sample Size" option and enter the percentage of the data you want to load, for example 10%. Make sure the "Use first row as headers" option is checked.
Click "OK" to apply the sample.
Click "Close & Apply" in the Query Editor to load the data into Power BI.
This will load a randomly selected sample of your data into Power BI, keeping all the columns and variables the same.
Yes, you can use Power BI to randomly select and load a sample of your database. Here's one way to do it:
In Power BI Desktop, select "Get Data" from the Home ribbon and then select "Text/CSV" as the data source.
In the "Import Data" dialog, select your CSV file and then click "Transform Data".
In the Query Editor, click the "Sample" button in the "Transform" tab of the ribbon.
In the "Sample" dialog, select the "Sample Size" option and enter the percentage of the data you want to load, for example 10%. Make sure the "Use first row as headers" option is checked.
Click "OK" to apply the sample.
Click "Close & Apply" in the Query Editor to load the data into Power BI.
This will load a randomly selected sample of your data into Power BI, keeping all the columns and variables the same.
Hi, thank you for your response.
I have followed your steps but I don't seem to find the "Sample" button in the transform tab in the query editor. Could you attach a screenshot of it?
Thank you!
I don't see a "Sample" button either... 3 years later... 🤣
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 65 | |
| 31 | |
| 28 | |
| 24 |