0

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"

  • Hi and welcome James, could you provide some data. [Explanation how to provide data in Power Query](https://stackoverflow.com/a/70773971/12242625) – Marco_CH Jan 19 '22 at 16:11
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jan 31 '22 at 17:06

0 Answers0