Hello,
When exporting to a excel file with "showFilters: true" it does not include label or value filters. To provide better audibility we'd like to be able to show all types of filters on an export.
Also would it be possible to add the showFilters feature to CSV as well?
Thanks,
Brian
Hello, Brian!
Thank you for reaching out to us.
Could you please provide more details on how you expect label and value filters to be represented in the export? For member filters, we list the members included in the filter, but label and value filters are condition-based. Would you like the exported report to include conditions, or a list of all members that meet the conditions? With this information, we'll be able to address your question better.
Looking forward to hearing your response.
Kind regards,
Solomiia
Solomiia,
Thats a good question. For the condition filter, I would expect just the condition to be shown(not the entire list of values that match).
Thanks,
Brian
Hello, Brian!
Thank you for your quick response.
Kindly note that you can add the conditional filters to your export by adding a headers option to theexportTo() API call. Here is the brief description of the suggested approach:
1. use getAllHierarchies() and getFilter() API calls to extract all filters applied in the current view.
2. format the extracted filterObject output as a string
3. customize export and insert the formatted string with filters as an export header:
pivot.exportTo('excel', {
header: stringifiedFilters,
showFilters: true,
});
We have prepared a JSFiddle example for illustration: https://jsfiddle.net/flexmonster/vn1Lqek6/
Regarding your earlier question about exporting applied filters to CSV, such an option is also possible, and included in the JSFiddle above. However, please note that CSV files with custom headers may not behave consistently across different tools or use cases.
Hope you will find our answer helpful.
Kind regards,
Solomiia
Hello, Brian!
Hope you are having a great week.
Our team is wondering if you had some time to check the suggested approach of adding conditional filters to the Excel export. Could you please let us know if the suggested approach works for your case?
Looking forward to hearing from you.
Kind regards,
Solomiia
Solomiia,
I haven't had a chance to test this solution yet. In the future I'm sure I'll come back to it.
Thanks,
Brian
Hello, Brian!
Thank you for your feedback.
Feel free to ask if any further questions arise.
Best regards,
Solomiia