# 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