Forum Discussion

StefanoGrimaldi's avatar
StefanoGrimaldi
Icon for Resident Rockstar rankResident Rockstar
2 years ago

Merge value with blank results and adjust it

hey guys, 

 

have a little topic to see if possible, 

 

Im doing a merge in power query by date from one table to another to get a exchange ratio for a group of invoice, but the exchange ratio have some empty dates (missing completly from the table) example: 

DateRatio
1/1/2023  56
3/1/2023  57

 

so basically I want or to be able to make a query that complete the missing date sequence with the value of the latest avaible date by month or the merge target to get the last avaible date before the invoice posting date. 

 

any idea or show of solutions will be greatly welcome. 

 

regards. 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Seems like if you sort it ascending then you can just use Table.FillDown.

     

    --Nate

    • StefanoGrimaldi's avatar
      StefanoGrimaldi
      Icon for Resident Rockstar rankResident Rockstar

      this a good idea I even try it but the problem its that maybe the invoice doesnt goes according in dates and the the ratio could have change in the blanks between the invoice vs the rates register. like I oculd have a ratio one month and another no but have a invoice each 2 or 3 month so the ratio that takes its the one 3 month before instead of the month before for the actual date of the invoice. so it would be kind of filling down on the ratio table, but cant find how to add the missing dates for them use a fill down on the ratio table query.