Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.