Filter out Empty Rows from Pivot Exports (#49512)
* Pivot Measures Order Used in Pivot Exports Fixes #48442 A pivot table can have any number of measures, and the user can order these by dragging in the UI. Before this PR, that order was ignored and measures would alway be in index order, which is confusing for any user who needs the measures to be displayed in a particular order, especially if they've re-ordered them in the pivot viz settings UI. A test has been added to check that measure order is used. A few minor changes to the pivot qp and post-processor - measure indices are looked up in the pivot qp and added in viz-settings order - the pivot measures are only added if the qp has not already added them. - pivot-opts Malli spec has been made in the namespace, adjusted to allow `nil` as a valid pivot-opts output, and used in relevant functions * address review points. * add a rows order test * Filter out Empty Rows from Pivot Exports Fixes #49353 The linked issue is not actually related to pivot export size but is instead related to the 'Min of Created At: Month' aggregation; the default aggregation function was `+`, so it broke when the date string was encountered. That was fixed. As I was trynig to keep the export small if possible, I noticed that in some cases empty rows are appended, so I added the filter so that if a pivot row's values are completely empty, it doesn't add it. Finally, this PR also adds the 'sub section totals' which I noticed were missing from the exports. This comes up when you have 3+ pivot-rows configured, so you can see the subtotals for the first pivot row and the subtotals nested within those sections for the second pivot row, and so on. * add test for non-numeric values * Make sure the new name refs match on aggregations not just breakouts * cljfmt
Please register or sign in to comment