Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Bishak
Frequent Visitor

How to import 2 blocks of data from a single Excel File?

Hi All,

 

I was wondering if anyone had a challenge like mine and managed to success. We receive customer forecast in a weird format.

It is an Excel spreadheet, data is pivoted and in two block of 3 weeks, one under the other. The biggest issue is that row count between the blocks and files may change.

The below is a snip of I get the data. Target is to combine both blocks and unpivot them.

Bishak_0-1648741726326.png

Any suggestions would be much appreciated
thanks

2 REPLIES 2
Bishak
Frequent Visitor

Many thanks for your suggestion, however this does not resolve my issue, I should have been more precise.
I need to pick these files up from  a folder, therefore need a solution that will work without manual intervention.

 

I want use the created date as a forecast date and then compare.

The ony thing I fail on is how to 'split' these two blocks of data where amount of line items within are variable.

thanks

Bish

v-yalanwu-msft
Community Support
Community Support

Hi., @Bishak ;

1.In Excel, set the two modules to only from table.

vyalanwumsft_0-1649037961291.png

2.In PowerBI, connect this excel.

vyalanwumsft_1-1649038065991.png

3.Transform it and In power query,use first row as Headers.

vyalanwumsft_2-1649038303522.png

Then Select all columns except code and name then unpivot.

vyalanwumsft_3-1649038422631.png

4.Perform the same operation in Table2.

5.append two tables.

vyalanwumsft_4-1649038525966.png

The final output is shown below:

vyalanwumsft_5-1649038564960.png

vyalanwumsft_6-1649038646025.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.