Forum Discussion
ilamoureuse
3 years agoRegular Visitor
Only keep DateMax row if there is a DateMin row
Hi! Following my previous post, I thought that my problem was solved but I didn't think about a case that breaks my vizualization. Here is a sample of my data : Work Item Id Iteratio...
- 3 years ago
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQwUNJRCi4oyswrUTAEMl0SS1IVfDPzgEwjAyNjXQMTXQOQeEBOYl5eaopSrA5OTYkVSJoMTfFpMsJuk6EZcZpQbDI2wKfJGJsmU4ifnHPyi0F6YgE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Work Item Id" = _t, #"Iteration Path" = _t, Attribut = _t, Date = _t, #"Catégorie de statut" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Work Item Id", Int64.Type}, {"Iteration Path", type text}, {"Attribut", type text}, {"Date", type date}, {"Catégorie de statut", type text}}), Grouped = Table.Group(#"Changed Type", {"Work Item Id","Iteration Path"}, {"Grouped", each if List.NonNullCount(List.Difference({"Date Min","Date Max"},[Attribut]))>0 then null else _}), #"Selected Rows" = Table.SelectRows(Grouped, each not ([Grouped] is null)), #"Expanded Grouped" = Table.ExpandTableColumn(#"Selected Rows", "Grouped", {"Attribut", "Date", "Catégorie de statut"}) in #"Expanded Grouped"
ilamoureuse
3 years agoRegular Visitor
It works ! Thanks a lot ThxAlot 😁