Forum Discussion
MongoDB With r
- 9 years ago
I resolve my problem but itsn't work for all list.
If you had second or third nest it didn't work. I set a loop to search which column is list() and do unlist() then the error is gone!
I update the problem.
mongolite return the query data is
id name belongs 1 user1 a,b,c,d(array) 2 user2 q,w,e,r(array
but power need to convert to this list,may be need the expandID after concat the table.
id name belongs 1 user1 a 1 user1 b 1 user1 c 1 user1 d 2 user2 q 2 user2 w 2 user2 e 2 user2 r
Did smoe buddies came across this situation?
- v-caliao-msft9 years agoMicrosoft Employee
You can split this column to multiple rows in Power query. Please refer to the steps below.
- Add a custom column.
- column expression
=Text.Split([belongs],",") - Expand to new rows
- Results
Regards,
Charlie Liao
- RachC9 years agoHelper I
umm.. it works cool!
but it's specify for known column but not for all list.
And need to covert evely column from list to text (or character) .I thought itsn't great for perfomence.I plan to implement transfer function that type of list is made new Table.
thanks for your tutorial!
- RachC9 years agoHelper I
I resolve my problem but itsn't work for all list.
If you had second or third nest it didn't work. I set a loop to search which column is list() and do unlist() then the error is gone!
- Add a custom column.