Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Table.TransformColumns - repeat rows n times and add a new column with 1 to n

Hello,   I have a revenue table that shows the total contract value, the start month, and the number of months (Term__c). I have been able to repeat the rows for the number of months, but I need to...
  • Anonymous's avatar
    Anonymous
    7 years ago

    I figured it out myself. I added a custom colum that copied the Term__c so that I had the original total months, then modified the TransformColumns step to this. The key was to drop the 3rd increment argument and use underscore as the second argument. TIL that underscore is a reference to the loop field when using each this way.

     

    Table.TransformColumns(#"Filtered Rows", {"Term__c", each List.Numbers(1,_), type list})