When I click on a cell to open the drillthrough view with a calculated value, the client sends the calculated value in the select request to the backend. An example is here https://jsfiddle.net/tx6ca4ez/2/. You can see "example_calc_value" is sent to the API but this isn't a column the API doesn't have knowledge about. While the example API seems to just filter out the field, my API implementation doesn't and throws an error.
Would you be able to update the client to not send calculated values in the "fields" list in the select request? I can filter these out on the backend but ideally I don't need to do that. If I start filtering these out, the client might send a non calculated field that actually expects data to be returned and I would just silently filter it out. Since the API doesn't do anything with these calculated fields in the "select" request, having the client not send them at all seems to make the most sense.
Thanks,
Brian
Hello, Brian!
Thank you for contacting us.
Kindly note that the mentioned behavior with calculated measures being sent in the /select
request for drill-through was originally intended. This request payload provides information about the measure used within the calculated value ( "uniqueName": "Quantity"
and "uniqueName": "Discount"
) and a calculated value name itself ( "uniqueName": "example_calc_value"
).
If the calculated value name is not needed, the "example_calc_value" field can be ignored.
Hope you will find our answer helpful.
Kind regards,
Solomiia
Solomiia,
Are there any use cases where the data server API needs to know about a calculated value? I thought that was only utilized on the frontend client?
-Brian
Hello, Brian!
Thank you for your feedback.
We double-checked this behavior and evaluated possible use cases. Our Dev team thinks it is indeed possible to optimize the current implementation. We will dig further and provide you with the update with ETA May 26th.
Feel free to reach out to us if any other questions arise.
Best regards,
Solomiia