How to filter max or min value in Power Query using UI Method in Excel & Power BI – “NO TIES”

In one of my blogs post we saw filtering data by slightly adding a touch of M code, but today we will see how to filter the min and max value with the UI method without using the M code.

Note: With this technique we can only select one row from the record, if you have ties and need to get both the records then you need to refer to this blog <coming soon>.

Below is our data set

DataSet for Power Query
Sample Data Set

Filtering the Max Value – NO TIES

  1. Load data into the Power Query Editor for Excel or Power BI.
Data Set Loaded into the Power Query
Data Loaded into Power Query Editor for Excel
  1. Change Data Type to Number > (Decimal, Whole Number, Currency) depending on the data set.
Min and Max Power Query No Ties - 01
Selecting the correct data type for the column

⚠️ Note : The data type shouldn’t be text data type.

  1. Sort the data in the descending order
Min and Max Power Query Ties - 03
sorting the data in descending order
  1. Go to Home >Keep Top Rows > 1
Min and Max Power Query Ties - 02
keeping top row

By this we will get our max value without Ties.

Similar way we can get the min value, where you just need to sort the data in ascending order and repeated the above step.

⚠️ Sorting of data is a very important step:

When you sort the data in descending (Largest to Smallest) then you shall Keep Top Rows 1 for max value and Keep Bottom Rows for min value.

When you sort the data in ascending (Smallest to Largest) then you shall Keep the Top Rows 1 for the min and Keep Bottom Rows for max value.

You can even add multiple level of sorting of data and then select the rows accordingly.

Download the sample file for Excel & Power BI << CLICK HERE >>


Was the information helpful in this blog?

  • If yes, hit that share button and show the excitement to the world.
  • Subscribe to our free posts.

Join 2,923 other subscribers

If no, please let us know what to improve.

Having trouble with any Office Apps. Feel free to ask and answer queries at our forums section.


0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x