I would like to change the layout of a input CSV file and change the layout of values.

So the initial Format has headings like: - Customer Zone Type 1 2 3 4 5 6 7 8 9 10 11 12

Under the number headings are the budget figures for a specific period, there are quite a few entries like this.

Now in order to use this data in a more meaningful way within SSRS I need it in the format of

  • Customer Zone Type Period Budget

Where the number is now underneath period and the figures are underneath budget.

Does anyone have any recommendations of software that will allow me to do this?

I was thinking that Excel VBA would let me do this, but I was unsure if it would or if there was a better alternative.

2 Answers 2


You can normalize crosstabbed data in the way that you want using a Python program named un-xtab.py. It can be installed from Python Package Index (PyPI) at https://pypi.org/project/un-xtab/. The documenation is in the file un-xtab.html in the doc directory of the Bitbucket repository at https://bitbucket.org/rdnielsen/un-xtab/src/default/.


I managed to get it working just using power query, though now I need to figure out how to automate the process of creating a CSV from this new data.

I might end up using your solution if this turns out to be able to help me in this respect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.