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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Ranking values in power query are reversed after merging two queries

In Power Query, I tried to create a ranking for location ID's based on a date. For this, I firstly sorted the location ID's based on the date. Subsequently I grouped all location ID's and created a custom column in order to add a ranking for each location ID.

Then, a new column is displayed with a correct ranking (most recent date has ranking value 1, most recent but one has value 2, then 3, etc.)

 

After merging the newly created column with another table, the ranking values are suddenly in reversed order. This means that the oldest date has ranking value 1, the oldest but one has value 2, then 3, etc.

 

It seems that a bug occurs during the query merge, which results in reversed ranking values.

The ranking as it should be:

JonasC_0-1674567870516.png

 The ranking after having merged 2 queries. The column [RankLastVisit] has a reversed value order:

JonasC_1-1674567997541.png

 



Status: Needs Info

Hi @Anonymous 

I tried to recreate the scenario you described, but failed. Can you provide your pbix file for reference(remove sensitive info) ?

 

Best Regards,
Community Support Team _ Ailsa Tao

Comments
v-yetao1-msft
Community Support
Status changed to: Needs Info

Hi @Anonymous 

I tried to recreate the scenario you described, but failed. Can you provide your pbix file for reference(remove sensitive info) ?

 

Best Regards,
Community Support Team _ Ailsa Tao

Anonymous
Not applicable

Hi @v-yetao1-msft ,

Please find the pbix file and excel data sources in the link below:
https://we.tl/t-QPlOR51PX1

 

Kind regards,
Jonas