+ Reply to Thread
Results 1 to 4 of 4

Power Query Records access record filed in let statement,

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    770

    Power Query Records access record filed in let statement,

    Hi,
    I have what I wanted as far as result but I think it may be better written,

    So within a let statement I wanted to get the record field values if TRUE so below produces true / false column

    Please Login or Register  to view this content.
    This below gives me true and false that I want, but it means typing it all out each time I want to use it in a step

    Please Login or Register  to view this content.
    Since original post I have got a result but if any one can suggest a neater / shorter way of wriing it plase let me know, I would like to use the 'one , two, three, four ' form the original records, but not sure this is possible. I will attach copy;

    This code i have is ;
    Please Login or Register  to view this content.


    Richard.
    Attached Files Attached Files
    Last edited by Dicken; 12-30-2023 at 09:45 AM. Reason: More information

  2. #2
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,505

    Re: Power Query Records access record filed in let statement,

    You could do it like this

    PHP Code: 
    let
        Source 
    Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        
    yList = {{"A".."D"},{"One","Two","Three","Four"},{10,20,30,40}},
        
    result Table.AddColumn(Source,"Custom"each Record.FromList(List.Transform(yList{0}, (x)=> if = [Itemthen yList{2}{List.PositionOf(yList{0},x)} else not true ),yList{1}))
    in
        result 
    Last edited by JEC.; 01-07-2024 at 11:41 AM.

  3. #3
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    770

    Re: Power Query Records access record filed in let statement,

    Thanks , I was non aware of record from list, so will look at how to use that first.

    Richard.

  4. #4
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    770

    Re: Power Query Records access record filed in let statement,

    Thanks I've been breaking this down into parts, not quite there yet but can see how you've got this all to work, I've been hardcoding to get results,

    really cleaver and I've learnt quite a lot so far including

    Please Login or Register  to view this content.
    which may come in useful at some point, thanks for the help.


    Richard.

+ 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. Replies: 2
    Last Post: 05-27-2023, 05:55 PM
  2. [SOLVED] Power query show records within dates
    By Undo in forum Excel General
    Replies: 6
    Last Post: 05-03-2022, 07:55 AM
  3. Display Duplicate Records using Power Query
    By alansidman in forum Tips and Tutorials
    Replies: 1
    Last Post: 07-14-2021, 12:48 PM
  4. Replies: 8
    Last Post: 10-21-2020, 03:02 AM
  5. [SOLVED] How to access data via VBA from a Connection Only Power Query query.
    By MLAN_75 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-14-2020, 11:45 AM
  6. Excel Power Query Refresh or Access Query - 2nd Query Run is faster
    By Steveapa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-03-2020, 10:16 AM
  7. [SOLVED] Power Query: Combine records with deliminter
    By misty15 in forum Office 365
    Replies: 4
    Last Post: 09-17-2019, 04:34 PM

Tags for this Thread

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