I would like to sort a bar chart by period and by customer.
Meaning that small customers will be on top of the big every period.
For example : in the screenshot below, Customer B (Yellow) will be below A in 2008
qvw file attached.
Thanks for your help
Nice solution Gysbert!
I think you can simplify the color expressions to:
If you use a dual() for the calculated dim you can get the Customer name in the pop-up
=aggr( dual( only(customer) , sum(amount) ) ,year,customer)
Ideally, that would work as the legend also and then the seperate legend chart wouldn't be required. But the legend groups by the numeric value -- I couldn't get it to display just the string customer values.
Actually, I later realized I already had added a color field to the table to link the customers with a color. So I could just have used color([color]) instead.
Thanks for the suggestion about using the dual function. That's a new trick for me with regards to making the popup look nice.