Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have a nested tables (3 Columns: Name - Excel file's name; Combined - What columns to keep; D - workbook table). Ends users will type what columns to keep (mess columns per file :<) that my case. So, I want to select these columns dynamicly way.
I try to play around with my data via this approach: https://bondarenkoivan.wordpress.com/2016/01/25/rename-columns-of-nested-tables-in-power-query/ but hard to rename columns cos so many dulicate columns.
Now i trying to transforms "Table" columns before expand it base on same next rows content "Combine": = Table.TransformColumns(Custom1, {{"D", each Table.SelectColumns("D",[Combined],[Combine])}})
So, yeah that error i face off. Anyone can help pls.
P/s: Sorry cos my english :<<.
Solved! Go to Solution.
My suggestion would be to add a Custom Column with formula:
= Table.SelectColumns([D],Text.Split([Combined],","))
Next you can remove column D.
Update:
Just play around with https://bondarenkoivan.wordpress.com/2016/12/12/transform-column-using-custom-function-in-power-quer...
My code here:
Custom2 = Table.FromRecords(Table.TransformRows(Custom1),
(ref)=> Record.TransformFields(ref,
{"D", each Table.SelectColumns(ref[D],ref[Combine],ref[Combine])}))
And new error:
Expression.Error: 1 arguments were passed to a function which expects 2.
Details:
Pattern=
Arguments=List
Still play around, any help is appricicated. Thanks
Happy querying guys ^^!
My suggestion would be to add a Custom Column with formula:
= Table.SelectColumns([D],Text.Split([Combined],","))
Next you can remove column D.
User | Count |
---|---|
140 | |
113 | |
104 | |
76 | |
63 |
User | Count |
---|---|
135 | |
126 | |
110 | |
70 | |
61 |