Open comdiv opened 2 years ago
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/utilities.js:694
case 'value_a_to_z':
this.rowKeys.sort((a, b) => naturalSort(v(a, []), v(b, [])));
break;
case 'value_z_to_a':
this.rowKeys.sort((a, b) => -naturalSort(v(a, []), v(b, [])));
break;
doesn't reqalculate subtotals so cannot sort them correctly
Have fix it for own usage, but may be it could be incorporated in main repository https://github.com/apache/superset/pull/20588
all known issues with sort fixed
Just to drop a note here, I'm trying to get an ephemeral environment up to test the PR. Hopefully we can get this merged, but more pivot table expertise would be nice for testing.
Assuming this is still an issue in current Superset? I'm trying again to spin up a test environment, but hoping @kgabryje can help test/review as well.
yes it is still an issue
While we have only one
row ordering
field but can add multiple row dimensions it's assumed that when we setorder by value decending
it will be work same way as withorder by a-z
:But if you choose order by value - it's breaking all groupping - all group rows occures multiple times in pivot!
Hard to explain how to exactly reproduce it.
Just compre two variances of ordering
a-z
andby value
As you can see - it cause valid behavior - group ordering then subgroup ordering
But try to set another option
It breaks table! Group is splitting and Subtotals not counted as expected!!!!