cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
roofiq Frequent Visitor
Frequent Visitor

Unpivoting data from multiple files and appending them

Hey guys,

 

I've used this great community many times and unfortunatly this time I couldn't find solution for my issue so I'm turning for help.

 

There are files coming every one week to one folder with pivoted data, something like this:

 

At the beginning I thought it was easy, I have used Expanded tables function so I got all the data form this folder in one query and then just used Unpivot function. It would work..but the data that is pivoted is very often different, see example below:

 

Example1:

DateCityProductID1ProductID2ProductID3
ABvaluevaluevalue

 

Example 2:

DateCityProductID1ProductID3
ABvaluevalue

 

In the above example, if we will Unpivot appended data it would give us false values (joining productID2 with productID3).

 

I need some kind of solution that will create for each file separated query and then will append all the queries together. Each file needs to be unpivoted separately, I can't think of anything else.

 

Anyone had situation like that?

 

Would be grateful for help.

Cheers,

Rafal

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Unpivoting data from multiple files and appending them

@roofiq,

 

You may try Table.UnpivotOtherColumns.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 REPLY 1
Community Support Team
Community Support Team

Re: Unpivoting data from multiple files and appending them

@roofiq,

 

You may try Table.UnpivotOtherColumns.

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