Here is a use case I've come up with. Adding a Total bar to a bar chart.
You would think this could be done with the chart script:
'Total' as Division,
sum(Sales) as Sales
But that script actually replaces the first row, not what I expect. I'm unsure if that is a bug or a misunderstanding on my part.
As a workaround, I can make it work with this script (this is how the first picture was generated)
Let vTotal = 0;
Let P = HCNoRows();
For J = 1 to P
Let vTotal = vTotal + HCValue(Sales,J);
Add Load 'Total' as Division, $(vTotal) as Sales Autogenerate 1;