+ Reply to Thread
Results 1 to 8 of 8

Xlookup in PQ

  1. #1
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Xlookup in PQ

    Hello,

    I have a table with week numbers as headers and a column of names, and the table has varying rates.

    In excel, I would use Xlookup to find the corresponding rate from the week number and name.

    What is the syntax in Power Query to achieve the same?

    Any help is greatly appreciated
    Kevin

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,985

    Re: Xlookup in PQ

    It would depend a lot on how you are trying to use it but a simple way would be to unpivot the table so your week numbers all end up in one column and then merge that to your source using the week number and name.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: Xlookup in PQ

    Thank you Rory

    I have two criteria, name and week number.
    I had thought about doing it the way you suggest but I have 500+ names and growing daily which would mean 26,000 rows.

    Thanks
    Kevin

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,985

    Re: Xlookup in PQ

    The unpivoting happens in PQ not in the worksheet, so I don't see that it matters?

  5. #5
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: Xlookup in PQ

    Okay, thanks.

    I am not that familiar with PQ. I will have a look and try understand the unpivot option

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,985

    Re: Xlookup in PQ

    Just FYI it would be useful to see a sample workbook to see the context of how you are trying to use this. There is always more than one way to do something and the best way depends on the context.

  7. #7
    Forum Contributor
    Join Date
    05-30-2015
    Location
    Dubai
    MS-Off Ver
    Excel 2016 Mac & PC & 365
    Posts
    633

    Re: Xlookup in PQ

    Thank you Rory..... it solved my problem
    Kevin

  8. #8
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,985

    Re: Xlookup in PQ

    Glad we could help, and thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Lookup xLookup or something..
    By xKelly in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-06-2021, 09:24 PM
  2. Using Xlookup in Macro
    By PrimePorkchop in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2021, 05:33 AM
  3. [SOLVED] Xlookup with Wildcards
    By dharvey1978 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-29-2021, 11:50 PM
  4. Two-way Xlookup
    By Ballet4ever in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-28-2021, 10:11 PM
  5. [SOLVED] Conditional XLOOKUP
    By gregwinter in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-11-2021, 11:36 AM
  6. [SOLVED] Xlookup with VBA, need some help!
    By CSimm in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-19-2021, 03:14 PM
  7. Xlookup & sum
    By lynusann in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-19-2020, 11:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1