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.

0 5 163
5 REPLIES 5

Lynn
Participant V

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.

Steve
Participant V

@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
)

Top Labels in this Space