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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
DataLake00
New Member

Bins and Ranking in Power Query

Hello everyone,

 

I have a table in this moment of 235 rows that is going to be expanded since it is a repository of projects. I would like to create with Power Query 10 bins and assign to the first bin the ranking value 10, to the second one 9, to the third one 8 and so on until the last one with 0.

Can someone help me in achieving this goal?

 

Many thanks in advance!!!

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @DataLake00 ,

To create bins in Power Query, you can follow these steps:
Load your data into Power Query Editor.
Right-click the field (column) you want to bin, then choose New group.
In the Groups dialog box, set the Bin size according to your preference to create 10 bins.
Click OK. A new field appears in the Fields pane with (bins) appended.

Assigning ranking values to bins in descending order can be achieved through a custom column:
With your binned data in Power Query, go to the Add Column tab and select Custom Column.
In the formula area, you can use a simple M code to assign rankings based on the bin. For example, if your bins are in a column named 'Bin', your formula might look something like 10 - [Bin]. This assumes your bins are numbered 0 to 9.
Click OK to add the column with rankings.

I found the following document for you that might be helpful:
Group Bin in Power Query - Microsoft Fabric Community
Create Customized Age Bins (or Groups) in Power BI - RADACAD
www.popautomation.com

Best Regards,
Dino Tao
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

collinsg
Super User
Super User

Good day DataLake00

While it is possible to bin in Power Query, the natural place to bin is in the report view as described here. What happens, in effect, is that a calculated column is added to the table. You can choose the number of bins or the size of bins.

Hope this helps

View solution in original post

2 REPLIES 2
collinsg
Super User
Super User

Good day DataLake00

While it is possible to bin in Power Query, the natural place to bin is in the report view as described here. What happens, in effect, is that a calculated column is added to the table. You can choose the number of bins or the size of bins.

Hope this helps

Anonymous
Not applicable

Hi @DataLake00 ,

To create bins in Power Query, you can follow these steps:
Load your data into Power Query Editor.
Right-click the field (column) you want to bin, then choose New group.
In the Groups dialog box, set the Bin size according to your preference to create 10 bins.
Click OK. A new field appears in the Fields pane with (bins) appended.

Assigning ranking values to bins in descending order can be achieved through a custom column:
With your binned data in Power Query, go to the Add Column tab and select Custom Column.
In the formula area, you can use a simple M code to assign rankings based on the bin. For example, if your bins are in a column named 'Bin', your formula might look something like 10 - [Bin]. This assumes your bins are numbered 0 to 9.
Click OK to add the column with rankings.

I found the following document for you that might be helpful:
Group Bin in Power Query - Microsoft Fabric Community
Create Customized Age Bins (or Groups) in Power BI - RADACAD
www.popautomation.com

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors