Forum Discussion
Unifiying ever increasing columm numbers to a single data source
- 4 years ago
Use this for your Unpivot step
Table.Unpivot(#"Removed Columns", List.RemoveNulls(List.Transform(Table.ColumnNames(#"Removed Columns"),each try if List.Contains(List.Numbers(1,12),Number.FromText(Text.Split(_,"-"){0})) then _ else null otherwise null)), "Attribute", "Value")
Importing from a folder requires some prior knowledge of M as you would be required to make the changes in Transform file.
My recommendation would be that you should see this video and practice importing files from a folder. Then you can come back. Then you will be able to follow the solution which I will give you.
Hello
I actually did it myself by using the filter and top row option on power querry to get the most up to date file and remove the rest. Then I used your unpivot command to unpivot the columms. Yes it works dynamicly doesnt matter if there is 2 columms or 3 it unpivots them all regardles. The only step it fails is when there is a type change where the names and number of columms. I'll dig deeper to understand your dynamic unpivot step 🙂
Your solution is welcomed as well if you can share it
Now I can merge this to back data 🙂
thanks
- Vijay_A_Verma4 years ago
Most Valuable Professional
Change type step will have to removed from everywhere as Change type hard codes the column names.
Please remove chane type step and let me know if you still face the issue.