Results 1 to 3 of 3

Power Query return list of values that occur x number of times

Threaded View

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

    Power Query return list of values that occur x number of times

    Hi,
    is there a way to replicate excel formula which returns values that occur twice.

      =INDEX( Table1[Item], MATCH( TRUE, COUNTIF($J$4:J4,Table1[Item])+(COUNTIF(Table1[Item],Table1[Item]))=2,0))
    I have used the following to get values that occur 1 time and + 1 time ;

    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        Item = ( Source[Item] ),
        dlist = List.Distinct(  Item ),
        dupe = List.Difference( Item,  dlist),
        Once = List.RemoveMatchingItems( Item,  dupe)
    in
        Once
    For a table I've got ;

       Table.SelectRows(Custom1, each 
                                                   List.Count( Table.SelectRows( Custom1, (A)=> A[Item] = [Item] ) [Item] ) = 2  )
    so could something similar be done for a list ? I have attached the above

    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. [SOLVED] Power Query List.Select list of values
    By Dicken in forum Office 365
    Replies: 3
    Last Post: 06-10-2024, 03:13 AM
  2. Power query Merge to return scaler value or list
    By Dicken in forum Office 365
    Replies: 3
    Last Post: 10-30-2023, 09:59 AM
  3. Replies: 2
    Last Post: 05-12-2023, 07:35 AM
  4. how to find each set of number occur times?
    By eddie01001 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-15-2019, 03:35 AM
  5. How do I return a value from another table that appears as a list item in Power Query?
    By sexcelhelp in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2019, 10:55 AM
  6. Return closest value less than given number matching another column - Power Query ?
    By ChipsSlave in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-29-2017, 03:16 PM
  7. Replies: 8
    Last Post: 07-14-2013, 07:29 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