Filtering by category

Hi All,

I have a table with customers, payments and categories A, B and C.
I’d like to filter with users that bought in category A, and show the number of payments of B and C.
The problem is that if I created a field with count(paymentId, category = ‘A’) and filter where this calculated field > 0 appears only category A, how can I show payments by categories where all customers paid in category A.

Thanks

Hi @KLIKIN
can you show what you did so far and maybe a sample of your data and what you want to achieve?
categorie is only field with value A,B and C?
BR

Sure, I have this table

CATEGORY
customerId A B C
1 1 2
2 2 1 1
3 2 1
4 2 2 2

I’d like to have this one:

CATEGORY
customerId A B C
2 2 1 1
3 2 1
4 2 2 2

As you can see, customerId 1 doesnt’t appear because there is no any purchase in category C in the first table

HI @KLIKIN
what about

countA = count(paymentId, category = ‘A’)
countB = count(paymentId, category = ‘B’)
countC = count(paymentId, category = ‘C’)

countAll = countIf({customer_id}, countA > 0 AND (countB > 0 OR countC >0 ))

Then filter on countAll

BR

hi @KLIKIN,

We hope the solution ErikG provided in above worked for you. Let us know if this is resolved. And if it is, please help the community by marking this answer as a “Solution" (check box under the reply)

kind regards,
Wakana

Hello @KLIKIN !

It has been some time since we have heard from you but we would still like to help you find a solution. If we do not hear from you in the next 3 business days this topic will be archived.