Explore our library to learn more through variety of topics

5 sales and inventory metrics you should track in your fashion store

Effortlessly unpivot data with Excel Power Query

When our customer came to me asking how we could load their historical General Leder (GL) data for the past four years, I knew I was in for a treat. They sent me an Excel file that was an extract of their current ERP system. The file was essentially a trial balance with 47 accounting periods presented in the columns. To make things more interesting, the file also had a sheet per Cost Center, each representing one of their stores or departments; 72 in total. These Cost Centers were defined as Global Dimension 1 during our implementation cycle. Here is what the data looked like:

blog-in-excel-power-query-1

My task was to take this raw data and transform it so that we could use it to create the General Journal entries. My tool of choice for this kind of work is Excel Power Query, which allows you to import or connect to external data and shape it to meet your needs.

No matter what kind of retailer you are, if you’re struggling to migrate a large amount of historical data, you may be able to use these steps to solve your problems. Here’s how:

1. Create the query to prepare for data transformation

Excel Power Pivot provides a powerful tool for efficiently transforming data. With just a few clicks, I created a query to combine all tabs into a single dataset. I opened a new Excel sheet and selected the file provided by my customer as the source data.

blog-in-excel-power-query-2

I’m now presented with the navigator where I need to select the main folder and click on “Transform Data.”

blog-in-excel-power-query-3

Now I have my Query where I can remove the columns I don’t need. First, I can select those columns and use the “Remove Columns” function in the toolbar.

blog-in-excel-power-query-4

Next, I must expand the data so that all my accounting periods and amounts are populated in the dataset and ready for the next transformation. 

I need to select the “Data” column and click on the icon to the right, making sure all my columns are selected before clicking “OK.” 

blog-in-excel-power-query-5

I can then promote my first row as headers.

blog-in-excel-power-query-6

2. Unpivot the columns

Now that my dataset has been defined, it’s time to unpivot the columns to get a new data set that I can use to create General Journal entries with. For this step, I need to select all the columns I want to unpivot then select the “unpivot columns” function in the “Transform” menu.

blog-in-excel-power-query-7

My columns have now been unpivoted!

blog-in-excel-power-query-8

3. Load the data into Excel

The last step is to simply load the data into Excel! All I need to do is to select the “Close & Load” function in the “Home” menu.

blog-in-excel-power-query-9

So, now I have a dataset that can be used easily as the source to create the General Journal entries and post to the General Ledger!

I want to point out that this dataset had just over 100,000 entries and it only took minutes for me to get from the source file to this dataset that I can now use.

blog-in-excel-power-query-10

By LS Retail

** Hotline: 092 636 2468
** Email: info@naviworld.com.vn
** Fanpage: NaviWorldVietnam

Featured Post

Asia Ingredients Group Expands Strategic Digital Transformation with NaviWorld Vietnam to Drive Sustainable Growth

December 9, 2025

Asia Ingredients Group Expands Strategic Digital Transformation with NaviWorld Vietnam to Drive Sustainable Growth Nghe An, Vietnam – December 8, 2025 – Asia Ingredients Group (AIG), Vietnam’s l...

KLB Group Launches Enterprise and Retail Management Project on Microsoft Dynamics 365 Business Central & LS Central Platform

October 25, 2025

KLB Group Launches Enterprise and Retail Management Project on Microsoft Dynamics 365 Business Central & LS Central Platform October 24, 2025 – At KLB Group’s headquarters, the Kick-off Ceremo...

NaviWorld Vietnam’s Dual VINASA Honors Mark a Defining Moment in Vietnam’s Digital Transformation Story

October 10, 2025

NaviWorld Vietnam’s Dual VINASA Honors Mark a Defining Moment in Vietnam’s Digital Transformation Story In Vietnam’s fast-maturing digital economy, only a handful of technology firms have manage...

Ready to get going?

We’d love to show you what we can do for your business.

Ready to get going?

Please share your contact informations below to allow one of our expert to contact you.

    About NaviWorld

    NaviWorld Vietnam is a leading solutions provider of end-to-end integrated and adaptable business management solutions for mid-sized companies in Vietnam and South East Asia.  With solutions catering for various sectors from Distribution to Retail, Services to Manufacturing, NaviWorld brings a portfolio of internationally proven, fully integrated technology business solutions to our customers.

    Contact Us

    Ha Noi

    • 11th Floor, 41 Hai Ba Trung Street, Hoan Kiem District, HN

    • Tel: +8424-3636 6268

    Ho Chi Minh

    • 13P Floor, 2BIS Nguyen Thi Minh Khai St., Dist. 1, HCM City
    • Tel: +8428-3840 3177

    Offices also in

    Request Call Back

      @2019 Naviworld Vietnam | Privacy Policy | Sitemap