Forum Discussion
Anonymous
4 years agoNot applicable
Adding a column or table with skipped rows
Hi! I managed to check how many "Nro. Comprob." rows are getting skipped. Now I'm trying to get which rows are getting skipped and I would like to add them to a new column or a new table, b...
- Anonymous4 years ago
try this
let Origine = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSgWAzSyBpZGQM4jgqxepEKxmhS5nDpYzRpEzM4FImaFKmBnApU3QpqF2xAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [indice = _t, tp = _t, vita = _t, nc = _t, desc = _t]), #"Modificato tipo" = Table.TransformColumnTypes(Origine,{{"indice", Int64.Type}, {"tp", Int64.Type}, {"vita", Int64.Type}, {"nc", Int64.Type}, {"desc", type text}}), #"Aggiunta colonna personalizzata" = Table.AddColumn(#"Modificato tipo", "NrComprCompleta", each try {[nc]..#"Modificato tipo"[nc]{[indice]}-1} otherwise {[nc]}), #"Tabella NrComprCompleta espansa" = Table.ExpandListColumn(#"Aggiunta colonna personalizzata", "NrComprCompleta") in #"Tabella NrComprCompleta espansa"
Anonymous
4 years agoNot applicable
try this
let
Origine = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSgWAzSyBpZGQM4jgqxepEKxmhS5nDpYzRpEzM4FImaFKmBnApU3QpqF2xAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [indice = _t, tp = _t, vita = _t, nc = _t, desc = _t]),
#"Modificato tipo" = Table.TransformColumnTypes(Origine,{{"indice", Int64.Type}, {"tp", Int64.Type}, {"vita", Int64.Type}, {"nc", Int64.Type}, {"desc", type text}}),
#"Aggiunta colonna personalizzata" = Table.AddColumn(#"Modificato tipo", "NrComprCompleta", each try {[nc]..#"Modificato tipo"[nc]{[indice]}-1} otherwise {[nc]}),
#"Tabella NrComprCompleta espansa" = Table.ExpandListColumn(#"Aggiunta colonna personalizzata", "NrComprCompleta")
in
#"Tabella NrComprCompleta espansa"Anonymous
4 years agoNot applicable
Thank you very much! I adapted it and it worked very well!