I can't find a way to simplify a query to get a similar result to a pivot. Although a pivot table is easy, I would prefer to use a query because I can then personalise headers.
Here's the link with the data :
CodePudding user response:
Try
={"Status","Count(Categories)";transpose(query(unique(B:C),"select count(Col2) where Col2 is not null pivot Col1",1))}
CodePudding user response:
if you want to pivot C column it should be:
=QUERY({Data!A1:C, Data!C1:C},
"select Col2,count(Col3) where Col1 is not null group by Col2 pivot Col4", 1)