Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello my fello Datanuts,
I am looking for some guidance on the best way to transpose a wide excel dataset into a long table in powerquery.
Background
I have inherited a profitability report that is fed from a spreadsheet populated by the most obscure and complex SQL setup I have ever seen (and I am not a SQL expert (yet!)). I know these things are always best done at the source, I am just unable to decode the horrible mess that was created before time began 😖
The Challenge
The first 4 columns of the data are company name a a few ID columns, which are then followed by blocks of columns (6 Cols) which hold the data for a particular month identified by a Billing Period ID, and each subsequent billing period has the same set of columns. And then at the end of the wide table I have a few other date fields that I need to keep.
The Data
My Dirty Fix
I did manage to get a dirty solution in place but it did not feel right, elegant or even dynamic enough given that there will be a number of excel files to merge into a single report.
While this may work in a most simplistic way, i am sure that there is a better way to achieve this, and I am hoping you folks can offer some guidance. Especially given that I would ideally like this to work for multiple excel files.
Thanks in advance.
David
Solved! Go to Solution.
@Chthonian
I did it using all GUI steps except for one small coding. Please check and let me know.
You can download the file: HERE
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Chthonian
I did it using all GUI steps except for one small coding. Please check and let me know.
You can download the file: HERE
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon on the right if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi @Fowmy,
Thats a much much cleaner way than I did it 🙂 and I can easily follow the steps in that.
Going to have a play but really appreciate the assistance sir!
Thanks a million,
David
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
21 | |
11 | |
10 | |
7 | |
7 |