title: PowerQuery: Adding multiple columns
body: <p>Little introduction.</p>
  
  <p><strong>Recent task</strong>: add 15 columns with same value.</p>
  
  <p><strong>Solution</strong>: Instead of consecutive use of Table.AddColumn, I applied following method.</p>
  
  <pre><code>= Table.RemoveColumns(
      Table.SplitColumn(
          Table.AddColumn(TableFromPreviousStep, "q", each "1")
          , "q"
          , Splitter.SplitTextByDelimiter(" ")
      , {"temp","q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q9", "q10", "q11", "q12", "qY+1", "qY+2", "qY+3"} 
      , 1)
  , {"temp"})
  </code></pre>
  
  <p><strong>Explanation</strong>: first I add temporary column named "q" with any default text value to the table. Then this column is split with space as delimiter (that's why it requires text), but since there is no spaces, it returns as many columns, as names count for them. First column retains original value and should be removed in a later step. All other new columns have default value of 1.</p>
  
  <p><strong>Question</strong>:
  My current task is creating several columns with values, calculated by a same formula. I try the same approach as above, but I fail to use any formula as default value. The best I've got is resulting columns containing a formula.</p>
  
  <p>Any help is appreciated.</p>