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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Grouped Stock Ranking problem

I am trying to sort grouped tables in power query, as part of an assignment from datacamp. First there were instructions to right click on grouped column, then click on add custom column. But there is only custom column from examples option only. Secondly when I try to make index column, using table.addindexcolumn for a grouped column that I sorted using table.sort then it gives me error in entire column. The formula I used for table.sort is:
Table.Sort([Grouped],{{"StockPlusOrderValue", Order.Descending}})

I used for table.addindex:

Table.AddIndexColumn([SortedGroup], "CategoryGroupedRank", 1, 1)

But now it is giving me entire column error

Please help if someone knows a solution

1 ACCEPTED SOLUTION

Hi @Anonymous 

 

It should be [Sorted Group]. You are missing the space character between two words.

vjingzhang_0-1686215808475.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

Can you please provide some sample data to help clarify what you have currently and what you want to achieve?

 

The formula looks correct. What is the error message after you used Table.AddIndexColumn([SortedGroup], "CategoryGroupedRank", 1, 1)? You can click the "Error" in a cell to see the detailed error message. 

 

Best Regards,
Community Support Team _ Jing

Anonymous
Not applicable

Sure, here I will share screenshots. It is northwind products data, hope this helps. I couldn't find an option to share files.Northwind Products Data.pngFirst Grouped column.pngSecond Sorted Grouped column.pngit says SortedGroup not foundit says SortedGroup not found

Hi @Anonymous 

 

It should be [Sorted Group]. You are missing the space character between two words.

vjingzhang_0-1686215808475.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors