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

Issue: Getting Top 5 Max filtered values

Hi all,

 

I have two columns col1 and col2, i am trying to get a top 5 maximum values from col2 on the basis of col1 value => "0".
Hers is the example of my solution:

 

 col1                                                                 col2

10.0856
00.98
30.99
70.97
00.93
00.45
80.75
00.65
30.36
00.52
30.25
00.71
90.12
00.35
00.94
00.56
100.28
50.33
00.15
30.78
70.66
250.15
20.41
00.23
00.84
10.14
00.64

 

 

can anyone please help me on that?

Regards,

-Ahmad

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

Hi @Anonymous, 

 

You can create a measure below: 

 

Measure = CALCULATE(SUM('Table'[col2]),FILTER('Table','Table'[col1]>0))
 
Then set visual level filter based on this measure: 
q1.PNG
 
Or you can create a calculated column below: 
 
Column = IF('Table'[col1]>0,RANKX(FILTER('Table','Table'[col1]>0),'Table'[col2],,ASC),BLANK())
 
Then set a visual level filter like below: 
q2.PNG
 
Best Regards,
Qiuyun Yu 
Community Support Team _ Qiuyun Yu
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

1 REPLY 1
v-qiuyu-msft
Community Support
Community Support

Hi @Anonymous, 

 

You can create a measure below: 

 

Measure = CALCULATE(SUM('Table'[col2]),FILTER('Table','Table'[col1]>0))
 
Then set visual level filter based on this measure: 
q1.PNG
 
Or you can create a calculated column below: 
 
Column = IF('Table'[col1]>0,RANKX(FILTER('Table','Table'[col1]>0),'Table'[col2],,ASC),BLANK())
 
Then set a visual level filter like below: 
q2.PNG
 
Best Regards,
Qiuyun Yu 
Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.