Calculation trouble

For time keeping and invoicing I'm using the formula =SUM(FILTER(A_History, "A_History[Customer]=%",[Company Name])[Time Spent]) to total up all of the hours used by a specific company and it works great (I'm proud of myself for getting this far) But there is also another column called "Billable" with a simple "Yes" or "No" option. I would like to exclude any "no" line items from the calculation.
How do I go about doing that?
Here are some screen shots to help...
Here is the A_History table


And here is the A_Customers table

Thanks in advance!

Hi @Matt-e8a3 Nice work!

You can add additional conditions by simply specifying AND or OR keywords between the conditions:

=SUM(FILTER(A_History, "A_History[Customer]=% AND A_History[Billable]=%",[Company Name], "Yes")[Time Spent])

BTW, since Customer is a rowlink in your history table, you can also do:

=SUM(FILTER(A_History, "A_History[Customer]=Thisrow() AND A_History[Billable]=%", "Yes")[Time Spent])

Additional info on filters:

And Thisrow()

1 Like

Oh, I see what you did there. That's excellent! Thank you! I ended up using ThisRow() option since it seems to be more versatile.
I'm definitely new to all this (I don't even know how to program) But HoneyCode has made it so I can do some incredible things! Thank you very much for being awesome and supporting newbies like me :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.