Forum Discussion

peterhui50's avatar
peterhui50
Helper III
5 years ago
Solved

Power Query folder combine -- file combining -- faster?

Hi,   I have a folder which we do monthly refreshes - 56 files with approx 100,000 KBs each. Each file has around 149 columns each and around 80000 rows of data. Due to the nature of the work, we c...
  • edhans's avatar
    5 years ago

    peterhui50 can you not use this:

    =List.ContainsAny({"A".."Z"}, Text.ToList([Column1]))

    It returns true or false. It is case sensitive. So the "xxxxx" value returns false since it isn't in A-Z

    Changing it to this returns Yes or No.

    if List.ContainsAny({"A".."Z"}, Text.ToList([Column1])) then "Yes" else "No"

    And changing it to this is case insensitive.

    if List.ContainsAny({"A".."Z", "a".."z"}, Text.ToList([Column1])) then "Yes" else "No"

     

     

  • edhans's avatar
    5 years ago

    peterhui50 - post back with performance enhancements. I don't know how much more efficient a List.Contains with Text.ToList is vs a single if/then/else with Text.Contains, but it surely must be more efficient than 26 of them!

    Thanks to mahoneypat for asking the right question. I was just thinking originally of a lot of data. Looking at the transformations should have been at the top of my list as well.