Results 1 to 1 of 1

Power Query Table Select Rows

Threaded View

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

    Power Query Table Select Rows

    Hi,

    Workbook with attempts attached.

    I've been trying to sum the last 3 values based on dates for each customer, , but rather than grouping I'd like to use Table.SelectRows;

    I've got
     Table.AddColumn(#"Changed Type", "Custom", each Table.SelectRows( Source, (A)=> A  [Customer] = _[Customer] ) )
    This returns a column of tables of each customer, withing this I'd like to restrict this to only the last / max 3 dates.

    I've got as far as

     Table.AddColumn(#"Changed Type", "Custom", each Table.SelectRows( Source, (A)=> A  [Customer] = _[Customer] and
                 
                                                                                                                                      A[Date] >=  List.Min( List.MaxN( Source  [Date] , 3 ) ) ))
    but the last clause is seeing all the dates, I did think of using
    A[Date] >=  List.Min( List.MaxN( A [Date] , 3 ) ) ))
    or A Source [Date] ,
    but no good,
    Any Suggestions,

    Richard
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 04-12-2022, 01:58 PM
  2. Replies: 1
    Last Post: 05-07-2021, 05:40 AM
  3. [SOLVED] Power Query - Expression Error: The Key didn't match any rows in the table
    By Baltimorejack68 in forum Excel General
    Replies: 7
    Last Post: 10-18-2019, 04:24 PM
  4. [SOLVED] Select Rows between blank rows using Power Query
    By beaglesBuddy in forum Excel General
    Replies: 5
    Last Post: 08-17-2018, 08:30 PM
  5. POWER Query and Power Pivot Table !!
    By haitham.shop in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-06-2018, 04:09 PM
  6. POWER Query and Power Pivot Table !!
    By haitham.shop in forum Access Tables & Databases
    Replies: 0
    Last Post: 08-06-2018, 05:59 AM
  7. [SOLVED] Power Query: Extract data from table after other rows are filtered
    By JimDandy in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-25-2017, 02:10 AM

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