Forum Discussion

GuilleATT's avatar
GuilleATT
Frequent Visitor
6 years ago
Solved

Merge query is acting weird

Hi,

 

I have a Sales table with closed dates between other variables and I'm trying to create a new column in Power Query to indicate if the Sales is the first time that happens for an AccountID. 

This way, I duplicated my Sales table, reduce it only to be AccountID and ClosedDate, ordering it ascending and removing duplicates on AcccountID column to obtain the first time a Sales happen to each AccountID.

 

Then on the original sales table, which is filtered now only for 2020, I merge it with the duplicated one to do what an Excel is a simple VLoopUk...

 

What my surprise is when expanding the columns of the merged table the dates retrieved aren't correct and even some dates retrieved are no longer part of the duplicated table since I removed duplicates...

 

Appreciate any help on this since it's driving me crazy.

 

Best,

 

Guillermo

3 Replies