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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Top and bottom 10 percent based on time (hh:ss)

Hi,

 

I have below data which the starting time for staff, I need to be able to exclude the bottom 10% of  staff that have started early, and top 10% of staff that finished late for the selected period.

 

how can I do that as measure. I am using tabluar model so I can't share the pbxi file.

 

Appreciate your help.

 

Capture.PNG

 

1 ACCEPTED SOLUTION
v-xuding-msft
Community Support
Community Support

Hi @Anonymous 

 

Or like this?

v-xuding-msft_0-1606287257942.png

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-xuding-msft
Community Support
Community Support

Hi @Anonymous 

 

Or like this?

v-xuding-msft_0-1606287257942.png

 

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Fowmy
Super User
Super User

@Anonymous 

Create the following measure and assign it to the visual filter and set it equal to 1. This will exclude the top and bottom 10% of the records.


Exclude = 
var __Rows = CALCULATE( COUNTROWS(Table9) , ALLSELECTED(table9))
var __RowsTop = __Rows * .1
var __RowsBottom = __Rows  - __RowsTop
var __Rank = RANKX(ALLSELECTED(Table9) , CALCULATE(max(Table9[Signed In DateTime])),,ASC)
return

 IF( __Rank > __RowsTop &&  __Rank < __RowsBottom , 1 , 0)

Fowmy_0-1606128153520.png

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Also, how can I count rows based on that ranking, i.e count rows excluding top and bottom 10%?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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