1
votes
=iferror(QUERY(importorders!A:H,“Select count(A) where C = ‘Thailand Tour’ and month(H) = “&MONTH(A3)-1&“and year(H) = “&year(A3)&” label count(A) ‘’“,1),0)

It’s basically just counting to see how many orders I had in each month.

https://docs.google.com/spreadsheets/d/1Of6cdFYaOzCFwPdZ4ABItD6dghMjHhafRWmDJWaznbg/edit#gid=711075203

enter image description here

2
Welcome to Stack Overflow! StackOverflow is not a free coding service. You're expected to try to solve the problem first. Please update your question to show what you have already tried in a minimal reproducible example. For further information, please see How to Ask, and take the tour :)Michele Dorigatti

2 Answers

1
votes

use this in B3 cell:

=ARRAYFORMULA(IFNA(VLOOKUP(A3:A, QUERY({importorders!A2:C, 
 EOMONTH(importorders!H2:H, -1)+1},
 "select Col4,count(Col1) 
  where Col3 = 'Thailand Tour' 
    and Col4 is not null 
  group by Col4
  label count(Col1)''", 0), 2, 0), 0))

0

0
votes

Try

=query(A2:H,"select Year(H), Month(H)+1, C, Count(H) where C is not null and C like 'Thailand%' group by Year(H), Month(H)+1,C label C'Tour',Year(H)'Year',Month(H)+1'Month'")

This data applied to a pivot table might provide a more digestible analysis.


Report Extract

Report Extract