Posts

Showing posts from April, 2021

PowerQuery - Merging Columns with a Line Break

Image
It is possible to merge columns with a line feed/break when using Power Query using #(lf) as a custom separator.  However , attempting to do so as in the above example results in the following: That is, #(lf) is (seemingly escaped) and replaced with #(#)(lf) . The easiest thing to do at this point to manually update the formula in the 2nd screenshot removing the middle (#) . Don't forget to wrap text on the column that will expose this data. 

Excel - Adding an existing Pivot table to the data model

Image
  I've been working more with, and continue to be amazed by, Power Pivot. I recently ran into an issue where I needed to add the data for an existing Power Pivot report to the Data Model. There is a checkbox that makes this easy when creating a PivotTable: As so often happens, the analysis grew in scope/importance and I found myself needing to add the data to the data model. While it's not obvious how, there is a way to add an existing Pivot table to the data model. There's a More Tables... link in the PivotTable Fields pane.  Clicking on the  More Tables... results in a dialog confirming that you want to Create a New PivotTable .  Doing so will result in the creation of the new PivotTable in a new sheet. By default the data is added to the data model. You'll likely lose some formatting but for anything other than a trivial PivotTable, this should save effort, as it did for me.