Button to calculate sum of a column with a filter?

I have and attendance table with date, hours, month(extracted from column 1 for filtering), salary.
How can I create a button that calculates salary for the current month?
Trying to use this as source value in a data cell:
=SUM(Filter(table, "table[Month]=%", "MONTH(TODAY())")[salary])

Return is "0"

Hi @Gaur-bcba thanks for your question. What does the table[Month] column look like? Is it a number? If so, does =SUM(Filter(table, "table[Month]=%", MONTH(TODAY()))[salary]) work instead?

How can I create a report like that but between two dates.

Hi @David-Abreu thanks for the question. It is possible to create a filter between two dates with something like:

=Filter(MyTable, "MyTable[Start Date]>=[Start Date] AND MyTable[End Date]<=[End Date]")

It's also possible to get an aggregate over a column of such a filter with something like:

=SUM(Filter(MyTable, "MyTable[Start Date]>=[Start Date] AND MyTable[End Date]<=[End Date]")[ColumnToSumFromMyTable])

If this does not answer your question, we will likely need more information to respond better. If that's the case, can you provide more details on what you're trying to achieve? If you're able to share some screenshots (without personal information), it will likely help answer your question better as well.

Happy building!

4 posts were split to a new topic: SUM FILTER