When we use the Custom Datasource Api, how do we handle cases when a Report Filter is applied to a “Calculated Field”? I was inspecting the network in the demo and noticed that if I created a calculated value and attempted to apply a report filter to it, the demo responds with an “Internal Server Error” on the
/select request. It is to my understanding that the Custom Datasource Api can only handle fields that itself already knows, not fields that were created by users via “Calculated Values.” If this is the case, how do we handle a
/select request that involves a field that was created by “Calculated Values”? Attached is a fiddle to for ease of replication, I’ve left comments in the html, but in case they get malformed:
Sum of Priceto
/selectrequest, presumably because
My Calculationis not a known
Thank you for reporting this.
Our team will take a look at the issue in question and do some research on what can be done here. We’ll return to you with updates on ETA Feb 22nd.
Please let us know in case there is anything else we can help you with in the meantime.
Sounds good! I just noticed I had a small typo in the original question – Step 1 should read “Click on the
COLOR Column.” Apologies for any confusion this may have caused.
Thank you for the heads up – no worries!
Thought I’d give a quick update – this might be related to a question I have posted. In our implementation of the Custom Datasource Api, we noticed that if we ignore “Calculated Values” in
/select requests, e.g., when filtering, the pivot table is able to filter the calculated values for us as long our implementation processes everything within the request that is not a “Calculated Value.” Is this the intended and/or recommended implementation for handling requests with “Calculated Values”?
Thank you for sharing your observation with us!
We’re happy you’ve found a workaround that works for you. What happens is when the custom data source API server receives a
/select request without the calculated value, the formula calculation for filtering is handled by the client-side instead, therefore eliminating the problem altogether.
Feel free to use this approach for now – our team will consider this when carrying out the research.
We’ll keep you posted.
Hope you’re doing well.
We’ve done some research and encountered a couple of technical limitations that would make it problematic to implement proper filtering by calculated values with the current pivot table architecture.
With that in mind, we are currently considering removing calculated value filters from the UI altogether.
Before forming our decision, we wanted to check with you whether you encountered the initial bug by accident or if filtering by calculated values is something you are planning to use frequently.
Could you please give us some insights on that?
Thank you in advance and looking forward to your response
I am not aware of anyone filtering on a specific calculated value but it seems like something that I could see people using i.e. rows where individual values > .5 That being said we are fine either way.
Thank you for your response.
In this case, we will most likely be removing this functionality from the pivot table for now until a better solution comes up.
As always, feel free to reach out in case there is anything else we can help you with.