Translating dynamic array formula for ranking into Power Query M code
Hi,
I have the following formula (courtesy of Bo_Ry), which gives incrementally increasing rank numbers to rows in a table, with equal rank to duplicate rows:
I am trying to achieve what this formula does by working with the data in Power Query. I have imported the table, and pasted values of the rank numbers, but I need an M code that does what the dynamic array function above does.
Any suggestions?
Best regards,
Marbleking
Last edited by Marbleking; 10-26-2021 at 08:58 AM.
Re: Translating dynamic array formula for ranking into Power Query M code
Hi,
Power Query? Are you sure you don't mean within DAX? Power Query is intended for accessing and transforming data; it is not designed to perform calculations, especially complex ones as you have here. In general: import, shape and transform the data within Power Query, then perform calculations within DAX (using either measures or calculated columns added to your tables).
Re: Translating dynamic array formula for ranking into Power Query M code
Hi XOR LX,
I was hoping to achieve this through using M code in Power Query, because these rank numbers will be used to further transform some of the data into unique column headers, by combining and transposing a few of the columns, including these rank numbers. If the same is possible by using DAX in the data model, and create a column which then can be used in Power Query, that would be fine. But I'm fairly new to these concepts. Guidance appreciated.
Bookmarks