I am trying to count the number of payments (non-zero) made in a fiscal year based on the property. I can do a Countif for each column but there can be a large number of columns (properties) so I would like to be able to create a formula using the whole array that can reference the property and the fiscal year.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]year[/TD]
[TD]Period[/TD]
[TD]North[/TD]
[TD]West[/TD]
[TD]South[/TD]
[/TR]
[TR]
[TD]2019[/TD]
[TD]1[/TD]
[TD]100[/TD]
[TD]50[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2019[/TD]
[TD]6[/TD]
[TD]100[/TD]
[TD]50[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2019[/TD]
[TD]9[/TD]
[TD]0[/TD]
[TD]50[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2020[/TD]
[TD]1[/TD]
[TD]100[/TD]
[TD]50[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2020[/TD]
[TD]6[/TD]
[TD]100[/TD]
[TD]0[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2020[/TD]
[TD]9[/TD]
[TD]100[/TD]
[TD]0[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2021[/TD]
[TD]1[/TD]
[TD]150[/TD]
[TD]0[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2021[/TD]
[TD]6[/TD]
[TD]150[/TD]
[TD]0[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2021[/TD]
[TD]9[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]75[/TD]
[/TR]
</tbody>[/TABLE]
This is the table I would like to create.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]2019[/TD]
[TD]2020[/TD]
[TD]2021[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]West[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]year[/TD]
[TD]Period[/TD]
[TD]North[/TD]
[TD]West[/TD]
[TD]South[/TD]
[/TR]
[TR]
[TD]2019[/TD]
[TD]1[/TD]
[TD]100[/TD]
[TD]50[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2019[/TD]
[TD]6[/TD]
[TD]100[/TD]
[TD]50[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2019[/TD]
[TD]9[/TD]
[TD]0[/TD]
[TD]50[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2020[/TD]
[TD]1[/TD]
[TD]100[/TD]
[TD]50[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2020[/TD]
[TD]6[/TD]
[TD]100[/TD]
[TD]0[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2020[/TD]
[TD]9[/TD]
[TD]100[/TD]
[TD]0[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2021[/TD]
[TD]1[/TD]
[TD]150[/TD]
[TD]0[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2021[/TD]
[TD]6[/TD]
[TD]150[/TD]
[TD]0[/TD]
[TD]75[/TD]
[/TR]
[TR]
[TD]2021[/TD]
[TD]9[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]75[/TD]
[/TR]
</tbody>[/TABLE]
This is the table I would like to create.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]2019[/TD]
[TD]2020[/TD]
[TD]2021[/TD]
[/TR]
[TR]
[TD]North[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]West[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]South[/TD]
[TD]3[/TD]
[TD]3[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]