How can we create a Distinct Countif aggregate formula?

How can we create a Distinct Countif aggregate formula?

Hello,

I am currently trying to filter a very large query table that has several pieces of data in it. Often times line items. The goal of this is 2 fold. 

1.) Is to please our client that is paying for Zoho reports by giving them Global Filters for 1 dashboard. 
2.) To produce accurate data in the reports off of this 1 query table. 

As we know, you cannot have 1 set of Global Filters on your dashboard if multiple reports have a different base query table. 

Here is our goal, we want to perform a countif("Booked"='true'). This of course works as expected and lets say that value is 24. Well truly our value is 22 because we have multiple line items with the same Id in this query table. So we really need something like countif("Booked"='true')-(count("QuoteId")-"Total Calls"). However, the problem with this formula, is that if I am doing the reverse countif("Booked"='false')-(count("QuoteId")-"Total Calls"). I am now getting a negative number. 

Please let me know if you guys have questions about the data that I am dealing with and how I can solve my problem here. We are finalizing up these reports for the client and then we need to move on. A speedy reply is definitely helpful.