I'm trying to build a report and within it I need to count an occurrence across 2 columns and return the number of times it occurs.
This is the data table: Data Table
Then the summary table needs to be: Name on the X axis and the columns should be the years. The value would the number of occurrences across the 2 columns in the raw data (Primary and Secondary).
I'm struggling to understand how to build this, any help would be appreciated.
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcitKzEtOVdJRMjIwMtA3MgSy3FPzi9JBQm6Z+XmJSrE60UrBBYmZeSiKIHI6SmDpUG8UOY/EoqJKkJqi1BSwPLIlhvpGRjA5mFI0K6BKYMagWIGqHepUdDuMUN2Bbr4Rmj9RLMCUjAUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Country = _t, Year = _t, Primary = _t, Secondary = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Country", type text}, {"Year", type text}, {"Primary", type text}, {"Secondary", type text}}) in #"Changed Type"