Results 1 to 3 of 3

Thread: Conditionally Replace Multiple Columns

  1. #1
    Acolyte Nick Burns's Avatar
    Join Date
    May 2017
    Posts
    84
    Articles
    0
    Excel Version
    Office 365

    Conditionally Replace Multiple Columns



    Register for a FREE account, and/
    or Log in to avoid these ads!

    TEST SAT SUN MON TUE WED THU FRI
    DEL 0 0 0 0 0 0 0
    R 0 0 8 8 8 8 8



    Using the table above, I'd like to null out the values of SAT-FRI when the value in TEST = DEL.
    Not sure if this would be a Table.ReplaceValue, but thinking this is a TransformColumns issue.
    Oh... by the way, YOU'RE WELCOME!

  2. #2
    Super Moderator Bob Phillips's Avatar
    Join Date
    Mar 2011
    Posts
    1,699
    Articles
    0
    Excel Version
    O365
    Why not keep it simple? Unpivot those columns, add a column with null for that condition, delete the original Value and rename the new column, then pivot back.

  3. #3
    Acolyte Nick Burns's Avatar
    Join Date
    May 2017
    Posts
    84
    Articles
    0
    Excel Version
    Office 365
    I get what your saying, but call it my anxiety, but if my recordset has 2,000+ rows, doesn't pivoting the columns now make the dataset 14,000+ rows to now check causing a lot of processing time?
    Or is the processing still the same since I'm doing the replacement 7 times over the course of 2,000 records?
    Oh... by the way, YOU'RE WELCOME!

Posting Permissions

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