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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
NumeroENAP
Helper III
Helper III

Get % sample of a table at random

Hi,

 

I need to filter my table so it only shows 15% of the lines in my table at random (sample round down). Thanks!

 

Folder
C1
C2
C3
C4
C5
C6
C7
C8
C9
C10
C11
C12
C13
C14
C15

 

Ex : 

C3
C6
2 REPLIES 2
AlB
Community Champion
Community Champion

Hi @NumeroENAP 

Interesting request.  Try creating a new calculated table. It will get closer to 15% as the number of rows grows:

 

NewTable =
FILTER ( Table1, RAND () <= ( 15 / 100 ) )

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

In my case, I would prefer a measure, because I can only access to production data (in consultation only). So, I can't create a table. Also, this table is in relation with other dimension tables (ex : results). 


@AlB wrote:

Hi @NumeroENAP 

Interesting request.  Try creating a new calculated table. It will get closer to 15% as the number of rows grows:

 

NewTable =
FILTER ( Table1, RAND () <= ( 15 / 100 ) )

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut


 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.