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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
savulesc
Helper I
Helper I

Remove a specific percentage of data from a table

I have a table with this structure :

 

TicketVerification TimeDepartment
123SW
245SW
345FR
412RT
556TY
62RT
767SW
822SW
934RT
1022RT

 

I want to remove from this table 10% of the tickets with the longest verification time. Multiple tickets can have the same verification time. So in the example from above ticket 7 will be removed. 

Is there a way i can do this?

 

4 REPLIES 4
Tahreem24
Super User
Super User

@savulesc Create a DAX Measure like below:

Measure =
VAR a_ = CALCULATE(MAX('Table'[Verification Time]),ALL('Table'))
RETURN CALCULATE(SUM('Table'[Verification Time]),FILTER('Table','Table'[Verification Time]<a_))
 
Capture.JPG
 
Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

I want the whole row to be removed , this implementation is not what i'm looking for.

amitchandak
Super User
Super User

@savulesc , I think you should consider

3 Ways to Scale Data to Remove Effects of Outliers

https://www.youtube.com/watch?v=Y3ahe3J3Zuo

 

or create a rank column

rankx(Table, [Verification],,desc, dense)

and filter rank based on number record

 

a new table

filter(addcolumn(Table, "Rank", rankx(Table, [Verification],,desc, dense) , "_cnt", countrows(Table) )/10, [Rank] >_cnt)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

I tried with the rank column but it's not working as expected. The rank is not the same for the same value.

TicketVerification TimeRank
1201
2203

 

And when i put the filter on the visual the table become empty.

Helpful resources

Announcements
September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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