I am building a stacked bar-chart with a user toggle between sort-alphabetically and sort-by-total descending. The problem is when the Y-axis has multiple elements then this sort statement ...
... results in a sort by the largest single Y element, not the Y total.; but if I turn on "Sort by Y-Axis" then I lose the ability to sort alphabetically. See attached screenshot below.
Is there a better way to code the sort expression or else to programatically toggle the "Sort by Y-Axis" checkbox?