Forum Discussion

littlevillage's avatar
littlevillage
Iron Contributor
Aug 26, 2022
Solved

How can use Power Query as a VLOOPUP replacement.

Hi,

I have a Excel file that combines the number of shippers for day 25 and 26.
I have created a Query to return a table that contain values of both days.
Today is 26, so I just want to use Power Query to return a table that's only the number of shipper of day 26.
I used VLOOPUP function to take values of day 26 from the table.
How can Power Query do the same that?
Hope for your response.
Thank you.

  • littlevillage 

     

    Here is a similar approach but instead of returning results that match the current day it returns the results for the last day in the appended table (whether that's today, yesterday, etc...).  

     

    I'm not sure what you have in mind for the general/continued workflow.  Are you planning to create a new tab for each day, then create a new query to pull the new table, then revise the append query to include the latest?   

     

    Using "Folder" as a data source could automate pulling in & appending new data, if you were to save a new workbook for each day in the same folder.   Just an idea.  Happy to elaborate.  

     

    I'm not sure if I'm blind but I cannot see where to attach a file as you both appear to have done.  Here is a link to it anyway.  

    https://1drv.ms/x/s!AiAvVNTmKlkpiq5NrkrSAS5X1ppvew?e=S0kjmb 

     

9 Replies

  • DexterG_III's avatar
    DexterG_III
    Iron Contributor

    littlevillage 

     

    Here is a similar approach but instead of returning results that match the current day it returns the results for the last day in the appended table (whether that's today, yesterday, etc...).  

     

    I'm not sure what you have in mind for the general/continued workflow.  Are you planning to create a new tab for each day, then create a new query to pull the new table, then revise the append query to include the latest?   

     

    Using "Folder" as a data source could automate pulling in & appending new data, if you were to save a new workbook for each day in the same folder.   Just an idea.  Happy to elaborate.  

     

    I'm not sure if I'm blind but I cannot see where to attach a file as you both appear to have done.  Here is a link to it anyway.  

    https://1drv.ms/x/s!AiAvVNTmKlkpiq5NrkrSAS5X1ppvew?e=S0kjmb 

     

    • littlevillage's avatar
      littlevillage
      Iron Contributor

      DexterG_III 

      Hi,

      Thank you for your response,

      Maybe, Which the function to returns the result for the last day-1?, ( in this case is day 25).
      Can you give me some advices.

      • DexterG_III's avatar
        DexterG_III
        Iron Contributor

        littlevillage There was no function to return the day prior to the last as it wasn't in the original request.  However, I created a third query which you can reference.  In this case, enter the specific date you want to return in F2 and refresh the query "SpecificDate" .