Forum Discussion
vic24he
1 year agoFrequent Visitor
Checking multiple rows for same ID, see if a value exists in a different column
Hi all, I have a data set that I'm having trouble with. Data example: ID | Year 1 | null 1 | 2000 1 | null 2 | null 3 | null 3 | 2001 I need to know if the Year ...
- 1 year ago
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUVKK1YEwjAwMDOAcMMMIxjBGZgDVGSrFxgIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ID = _t, Year = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Year", Int64.Type}}), #"Grouped Rows" = Table.Group(#"Changed Type", {"ID"}, {{"Rows", each _, type table [ID=nullable text, Year=nullable number]}}), #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Year Populated", each if List.Count(List.RemoveNulls([Rows][Year]))>0 then "yes" else "no") in #"Added Custom"
ThxAlot
Super User
1 year agoEasy enough,
Mederic
Post Patron
1 year agoHello,
I am interested in this thread and the 2 solutions work very well.
Regarding the Power Pivot proposal, is it possible to load the result into an Excel sheet without using a pivot table?
As for a query where the table can be updated
Thanks in advance
Best regards
- ThxAlot1 year ago
Super User
YES and NO.
Yes for creating a refreshable pivot in a worksheet this way,
No because inherently, a pivot always imposes "group by" operation on selected columns by default.