Help with array formula

Hi,
I have an app connected to google sheets and I am having trouble with a formula that I was creating in a column inside sheets. I can get it to work on a row basis but not as an array.
This formula works on a row basis:-
=countunique(iferror(filter(temp!$B$2:$B, A2=temp!$O$2:$O)))

but when I put it inside an array it works but only returns zeroโ€™s:-
=ARRAY_CONSTRAIN(ARRAYFORMULA(IF(A2:A4392="","",countunique(iferror(filter(temp!B2:B, A2=temp!O2:O))))), 4391, 1)

Any help is appreciated!
I second question out of interest is how would I create the same information within appsheet instead of coding it direct into sheets?
THanks in advance

0 3 173
3 REPLIES 3
Top Labels in this Space