Forum Discussion
mohsin-raza
Helper III
1 year agoremoving row in power bi based on condition
Hi. I need help solving this problem. I have a dataset contain emplyee information . here is a sample snummer date Namn adrsess Postnummer 934096 null Smer abc GH784 9...
- 1 year ago
Hi,
You can use this code, or see the attached file
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WsjQ2MbA0U9JRAqLg3NQiIJWYlAwk3T3MLUyUYnWQlBgZGBnrGpjpGpopGBhYGRjg0BILAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [snummer = _t, date = _t, Namn = _t, #" adrsess" = _t, #" Postnummer" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"snummer", Int64.Type}, {"date", type datetime}, {"Namn", type text}, {" adrsess", type text}, {" Postnummer", type text}}), #"Sorted Rows" = Table.Buffer(Table.Sort(#"Changed Type",{{"date", Order.Descending}})), #"Removed Duplicates" = Table.Distinct(#"Sorted Rows", {"snummer", "Namn", " adrsess", " Postnummer"}) in #"Removed Duplicates"
Omid_Motamedise
Super User
1 year agoHi,
You can use this code, or see the attached file
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WsjQ2MbA0U9JRAqLg3NQiIJWYlAwk3T3MLUyUYnWQlBgZGBnrGpjpGpopGBhYGRjg0BILAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [snummer = _t, date = _t, Namn = _t, #" adrsess" = _t, #" Postnummer" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"snummer", Int64.Type}, {"date", type datetime}, {"Namn", type text}, {" adrsess", type text}, {" Postnummer", type text}}),
#"Sorted Rows" = Table.Buffer(Table.Sort(#"Changed Type",{{"date", Order.Descending}})),
#"Removed Duplicates" = Table.Distinct(#"Sorted Rows", {"snummer", "Namn", " adrsess", " Postnummer"})
in
#"Removed Duplicates"
- mohsin-raza1 year ago
Helper III