Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Custom Index / Partition Dense Rank in Power Query M

I'm trying to achieve a dense ranking in Power Query so I can produce the following output where I have two "levels" of ranking as seen in the below screenshot. I'm pulling from SAP HANA but the Wind...
  • Anonymous's avatar
    Anonymous
    6 years ago

    HI Anonymous ,

    My query contains custom steps with invoke custom functions to loop table records on each row for calculating, it seems like not works on your scenario due to huge amount records. (notice: actual calculate amount may larget than 2.1M*2.1M*2)

    In my opinion, I'd like to suggest you add a row index to query table then use multiple column ranking(ISONORAFTER function with group columns and custom row index column) to add index or different column groups on the data model table side.

    Reference links:

    Sorting by multiple columns 

    Notice: row index column that I ask you to add in the query table side is used to prevent the duplicate ranking of similar group records.

    Regards,

    Xiaoxin Sheng