 # Add amounts that meet 3 criteria in a general table

Hello guys.

I need to add the amounts within a MONTH table that meet 3 criteria, within a table:

** CRITERIA **
Type = Expense
Responsible = Office
Payment = Cash

How could I do that?

I have achieved it with two criteria, but when trying for 3 criteria it already marks an error.

Hi @Everardo_Garcia
Please show us what you have tried that doesn’t work. It will give us more if an idea of what you are after thanks,
Snap

I currently use this formula for 2 criteria

SWITCH (
[Month],
“January”, SUM (SELECT (January [Amount], [Type] = Income, [Responsible] = Office)),
“February”, SUM (SELECT (February [Amount], [Type] = Income, [Responsible] = Office)),
“March”, SUM (SELECT (March [Amount], [Type] = Income, [Responsible] = Office)),
“April”, SUM (SELECT (April [Amount], [Type] = Income, [Responsible] = Office)),
“May”, SUM (SELECT (May [Amount], [Type] = Income, [Responsible] = Office)),
“June”, SUM (SELECT (June [Amount], [Type] = Income, [Responsible] = Office)),
“Julio”, SUM (SELECT (Julio [Amount], [Type] = Income, [Responsible] = Office)),
“August”, SUM (SELECT (August [Amount], [Type] = Income, [Responsible] = Office)),
“September”, SUM (SELECT (September [Amount], [Type] = Income, [Responsible] = Office)),
“October”, SUM (SELECT (October [Amount], [Type] = Income, [Responsible] = Office)),
“November”, SUM (SELECT (November [Amount], [Type] = Income, [Responsible] = Office)),
“December”, SUM (SELECT (December [Amount], [Type] = Income, [Responsible] = Office)),
0
)

@Lynn E This is the formula that I use for two criteria within the table for each month.

Now I seek to add one more criterion that of cash payment.

1 Like

@Steve I already solved it with AND.
SWITCH (
[Month],
“January”, SUM (SELECT (January [Amount], AND ([Type] = Expense, [Responsible] = Office, [Payment] = Cash))),
“February”, SUM (SELECT (February [Amount], AND ([Type] = Expense, [Responsible] = Office, [Payment] = Cash))),
“March”, SUM (SELECT (March [Amount], AND ([Type] = Expense, [Responsible] = Office, [Payment] = Cash))),
“April”, SUM (SELECT (April [Amount], AND ([Type] = Expense, [Responsible] = Office, [Payment] = Cash))),
“May”, SUM (SELECT (May [Amount], AND ([Type] = Expense, [Responsible] = Office, [Payment] = Cash))),
“June”, SUM (SELECT (June [Amount], AND ([Type] = Expense, [Responsible] = Office, [Payment] = Cash))),
“Julio”, SUM (SELECT (Julio [Amount], AND ([Type] = Expenditure, [Responsible] = Office, [Payment] = Cash))),
“August”, SUM (SELECT (August [Amount], AND ([Type] = Expense, [Responsible] = Office, [Payment] = Cash))),
“September”, SUM (SELECT (September [Amount], AND ([Type] = Expense, [Responsible] = Office, [Payment] = Cash))),
“October”, SUM (SELECT (October [Amount], AND ([Type] = Expense, [Responsible] = Office, [Payment] = Cash))),
“November”, SUM (SELECT (November [Amount], AND ([Type] = Expense, [Responsible] = Office, [Payment] = Cash))),
“December”, SUM (SELECT (December [Amount], AND ([Type] = Expense, [Responsible] = Office, [Payment] = Cash))),
0
)

1 Like