Forum Discussion
gribeiro_2021
5 years agoFrequent Visitor
split rows
Hello, I have the following financial data exported to power bi: Food and Beverage Título 876200/1 - Brico Título 2721741/1 - Pama Título 804008/1 - Citro ...
- 5 years ago
Hi gribeiro_2021 ,
please paste this code into the advanced editor and follow the steps:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("dZG9TsMwFIVf5SpzKflpE2dM6c9QCJVKu0QZbpKrYCnEke0Aj8PKwMQbkBfDcsWSFG9X53w+x75Z5myFqADbClb0ShJrcmaOk88y52n40n0jzMii0HfdWw9uYCV5KUayH/letPCsfsAXHNPuwnWZVe+4luLnY2TwgnAZxPGFHz479Rex7iUWDUFtKqpprUviDgvJqbFaopQoOWouWvuklN5Uhx3JK3TEAstvVCm5Hr4lnzZjnveP51E/k4QHrkpqGmxJ9Ao27x21iq5ksdgctrR37bHp2xrhOE/msE/uT+kusfYzlrb5FA9ZaNG0LzjCmuBo4hDOZl1qYo2sNamU+YOtkLpvUQs4cGmK5fkv", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type text}}), #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each if [Column2] = null or [Column2] = "" then [Column1] else null), #"Filled Down" = Table.FillDown(#"Added Custom",{"Custom"}), #"Filtered Rows" = Table.SelectRows(#"Filled Down", each ([Column2] <> "")) in #"Filtered Rows"
amitchandak
5 years agoSuper User
gribeiro_2021 , I think some M code may help
ImkeF , can you help on this