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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
dana1
Frequent Visitor

Selecting Random set of Records from a Datase

 hello,

 

I have a big dataset of calls to our call center.

i want to select 10% random rows every day (for polls).

 

any suggestions?

2 REPLIES 2
v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @dana1,

Have you resolved your issue? If you have, please mark the helpful or right reply as answer. So more people will find workaround easily.

Best Regards,
Angelia

v-huizhn-msft
Microsoft Employee
Microsoft Employee

Hi @dana1,

Which database do you use? When you get data in Power BI desktop, you can program statement to filter your data. For example, if you store data in SQL Server database, use the following statement to filter your data. Please replace the column and table names to yours.

SELECT TOP   
  (SELECT COUNT(*)/10 FROM [Test].[dbo].[ZZZZZ_____Test1])  
       [EmpName]
      ,[CustNetID]
      ,[ScanDate]
  FROM [Test].[dbo].[ZZZZZ_____Test1]
  ORDER BY NEWID()


In Power Bi desktop, click "get date" on home page->SQL Server, then type the statement in statement box. 

1.PNG

Best Regards,
Angelia

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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