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 5 Breakdown

I have made a graph that shows each downtime code and its corresponding volume down sorted largest to smallest. Is there a way to display the top 5 wells for the top 5 downtime codes in table format? Thanks

 

Downtime Graphs.PNG

 

 

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

Hi  @Anonymous ,

According to your description, I create this data:

v-yangliu-msft_0-1612400234415.png

Here are the steps you can follow:

1. Create calculated column.

rank = CALCULATE(COUNT('Table'[date]),FILTER('Table','Table'[date]=EARLIER('Table'[date])))

2. Create measure.

Measure =
var _1=RANKX(ALL('Table'),CALCULATE(MAX('Table'[rank])),,DESC,Dense)
var _2=MAX('Table'[rank])
return
IF(_1<=5,_2,BLANK())

3. Result.

Display the number of times per day with a bar graph

v-yangliu-msft_1-1612400234420.jpeg

Show the top five in a table:

v-yangliu-msft_2-1612400234423.jpeg

 

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

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

3 REPLIES 3
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

According to your description, I create this data:

v-yangliu-msft_0-1612400234415.png

Here are the steps you can follow:

1. Create calculated column.

rank = CALCULATE(COUNT('Table'[date]),FILTER('Table','Table'[date]=EARLIER('Table'[date])))

2. Create measure.

Measure =
var _1=RANKX(ALL('Table'),CALCULATE(MAX('Table'[rank])),,DESC,Dense)
var _2=MAX('Table'[rank])
return
IF(_1<=5,_2,BLANK())

3. Result.

Display the number of times per day with a bar graph

v-yangliu-msft_1-1612400234420.jpeg

Show the top five in a table:

v-yangliu-msft_2-1612400234423.jpeg

 

You can downloaded PBIX file from here.

 

Best Regards,

Liu Yang

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

 

smpa01
Super User
Super User

@Anonymous  you can try the following measure

 

M:= RANKX(ALLSELECTED(table[rank to happen for column]),[downtime measure],,DESC)

 

then you can put that into visula filter and limit that to 5

Capture.PNG

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
Anonymous
Not applicable

I am recieving the following error message "A single value for column ‘Gross_BOE_Down’ in table ‘Production_Downtime_Volumes’ cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."

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.