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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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