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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

Filter table by highest value

My table is like this

t1.PNG

I want to filter the table by the highest [ Rec] value as follows

t2.PNG

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Based on your description, you can create a measure as follows.

Measure = 

var x1=MAXX(FILTER(ALL('Table'),[Custld]=SELECTEDVALUE('Table'[Custld])),[Rec])

return

IF(MAX('Table'[Rec])=x1,1,0)

Then you can drag it to the filter of the table visual you created and select "value=1".

 

v-yuaj-msft_0-1615427695959.png

Result:

031101.gif

 

 

 

 

 

 

 

 

 

 

 

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

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
Ashish_Mathur
Super User
Super User

Hi,

Do you want the result using the Query Editor or using measures in a visual?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Anonymous ,

 

Based on your description, you can create a measure as follows.

Measure = 

var x1=MAXX(FILTER(ALL('Table'),[Custld]=SELECTEDVALUE('Table'[Custld])),[Rec])

return

IF(MAX('Table'[Rec])=x1,1,0)

Then you can drag it to the filter of the table visual you created and select "value=1".

 

v-yuaj-msft_0-1615427695959.png

Result:

031101.gif

 

 

 

 

 

 

 

 

 

 

 

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

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

PaulDBrown
Community Champion
Community Champion

@Anonymous 

Sorry, I'm cannot see the criteria by which the values are filtered. Can you explain further please?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Anonymous
Not applicable

@PaulDBrown 

It should be based on "Rec" column. For an example, customerId 789 has four rows of data, among them I want to get the highest "Rec" number containing row which is number 4. 

Helpful resources

Announcements
Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors