+ Reply to Thread
Results 1 to 3 of 3

Power Query: Keep rows with blanks in column2 only if value in column1 is unique

  1. #1
    Forum Contributor
    Join Date
    08-20-2011
    Location
    Oslo
    MS-Off Ver
    MS 365
    Posts
    245

    Power Query: Keep rows with blanks in column2 only if value in column1 is unique

    Hi,

    I have a table in Power Query, where I need to remove rows which have blanks in column 2, unless the value in column 1 is unique. In other words; Keep rows with blanks in column2 only if value in column1 is unique, and discard if not.

    The attached workbook shows which rows to keep and which to discard, using this formula:


    =IF(OR(AND(COUNTIF($A$2:$A$135,$A2)=1,ISBLANK($B2)),NOT(ISBLANK($B2))),"KEEP","DISCARD")

    How is this done in Power Query?

    Best regards,
    Marbleking

  2. #2
    Forum Contributor
    Join Date
    04-15-2013
    Location
    Singapore, Melbourne
    MS-Off Ver
    Office 365
    Posts
    167

    Re: Power Query: Keep rows with blanks in column2 only if value in column1 is unique

    This is my code, hopefully there will be a better solution.

    Please Login or Register  to view this content.
    Row row row your boat
    Gently down the stream

  3. #3
    Forum Contributor
    Join Date
    08-20-2011
    Location
    Oslo
    MS-Off Ver
    MS 365
    Posts
    245

    Re: Power Query: Keep rows with blanks in column2 only if value in column1 is unique

    Thanks a lot!

+ 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. hello, combine column1 and column2 without repeating the line.
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-11-2019, 08:13 PM
  2. In same row Textbox value in column1 displays textvalue in column2
    By gipsyfkls14 in forum Access Tables & Databases
    Replies: 0
    Last Post: 11-10-2018, 07:37 PM
  3. If Column1 = X and Column2 = Y...
    By kestefon in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-25-2014, 07:35 AM
  4. Replies: 12
    Last Post: 07-10-2014, 01:36 AM
  5. Delete row containing column1 column2 etc
    By lemonstar in forum Excel General
    Replies: 2
    Last Post: 09-26-2011, 11:26 AM
  6. Replies: 4
    Last Post: 08-03-2011, 08:22 PM
  7. compare column1 with column2
    By myguess21 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-12-2005, 03:55 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