Forum Discussion

sysmod's avatar
sysmod
New Member
4 years ago
Solved

Is there a While or Until condition in PQ?

I am writing code to automatically use Workbook Queries in Powerquery to open CSV files, so I am not working through the UI. I write M code in VBA and use that for the query.   I have a method to s...
  • ImkeF's avatar
    4 years ago

    Hi sysmod ,

    the List.Generate function has such a condition in its 2nd argument. But to avoid re-evaluation of the iterated table in each step, you have to use a Table.Buffer. That itself can be a killer on large datasets. So you have to find a balance here. I believe that this is the main dilemma we have in PQ that will prevent any dynamic type detection as you're envisioning running fast on large datasets.

    Also, I am not using Table.Profile on large datasets, because the calculation of the standard deviation in it makes it slow. Instead I apply List aggregators for each column only for the fields I really want to see.