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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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