Pivot reporting framework

Does view work here? I was using stream to minimise the number of comparisons, stopping at the first non-zero