Its hard for me to understand the exact problem you’re having without seeing an example doc, but I think the solution can be found in using other formulas. Take a look at both
Use good indentation and nesting in your formulas (as you have) and don’t be afraid if they grow. I have some formulas over 100 lines that switch() depending on the condition.
If you have more questions create a simplified example and the community can help!
in the Statistics section you see the Filters table that should be used to set the filters for the Filtered Purchases table.
Only the CustomerValue is working right now:
if I choose a customer the Filtered Purchases table will show the sum of Cost and the sum of Price fields for that customer
if I leave it blank the Filtered Purchases table will show the sum of Cost and the sum of Price field for all customers
The formula I need help with is inside the Filtered Purchases Table on the Cost column; that formula filter on the base of CustomerValue and Date and as I said if CustomerValue in not set that filter is ignored.
How I can add the SupplierValue (and maybe many more filter) in the Filters table to the formula so that I could for example:
see the cost and price for last month for customer greenOffice for items bought from Amazon.
or
see the cost and price for all customers for the items bought from apple
or
see the cost and price for last month for customer greenOffice for items bought form any suppliers
p.s.
Cost and Price on Filtered Purchases table are almost the same
Then add two new controls to the document, one as a Single Select and one for a Date Range. Set the single select, and point ‘Selectable Items’ to be a formula pointing to ‘Customers’. Name this ‘Customer Control’. Then add a date range control. It’s default name will be ‘daterangepicker 1’.
…your suggestion make sense but I choosed to use a separated table instead of a view because my Filtered Purchase table is always one line and show always the sum of Cost and the sum of Price for the filtered items.
With your approach if I have hundreds of purchases the view table will show, even with filters, many rows and I have to scroll down to see the totals.
What I’m try to achieve is to have one row with totals based on filters I choose…
OK I think I’m tracking you. Can you make my suggested changes to the doc you’ve shared and then I’ll hop back in and try to create your single line view you are looking for?
Can you also scaffold out an example of what you want the final view to be (specify the control states) and what you expect the output to be.
Hello, I scaffold out an example with your suggestions.
In the Statistics section you see a data range picker, a customer selector, a supplier selector and an operator selector.
What I want to achieve is filter the Purchase Summry table with those selectors so that it show me the filtered rows.
For example I want to see all the last week purchases for redOffice, bought from amazon and assigned to operator Brad.
If one filter is blank (for example no operator) that filter should be ignored (show all operators)
Lastly I would like that the filtered results rows will be summarized (reduced) to one row with total cost and price for that selection as I did in previoud example when I used a dedicated new summary table instead of a view.
OK we’re getting closer. Those controls are great. You can link them to the table by opening up the table filter and creating formulas that reference them.
A more accessible way is to use the ‘interactive filter’ option for each column you want to filter by. Right click on the column and choose interactive filter. It looks like it will even try to match up to your existing filters. Here’s how you do it:
…I see, that’s another way to filter columns…interesting but it doesn’t resolve my problem: I need the option to leave the filter blank to see all results.
I ended up using “multiple select controls” that have the select all options. I don’t like the design and usability of this controls I woult prefer the “single select ones” but seems that currently is the only way to have the “all” option.