Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I'd be hugely grateful if you could offer me some advice.
if you use a crosstab in the load (I suggest this way) you simplify the chart, the table should be
Customer, Age, Gender, Product, Sales
if you don't want to modify the table, maybe you can find some help in the attachment
Personally I would use the crosstable function to transform the data:
Sales:
Crosstable(Product, Amount,3)
LOAD Customer, Age, Gender, Socks, Scarves, Hats, Gloves
From ...salessource...;
The resulting table will look like:
Customer | Age | Gender | Product | Amount |
A | 20 | M | Gloves | 0 |
A | 20 | M | Hats | 1 |
A | 20 | M | Scarves | 4 |
A | 20 | M | Socks | 10 |
C | 28 | F | Hats | 0 |
C | 28 | F | Socks | 0 |
C | 28 | F | Scarves | 4 |
C | 28 | F | Gloves | 8 |
B | 32 | F | Scarves | 0 |
B | 32 | F | Gloves | 2 |
B | 32 | F | Socks | 2 |
B | 32 | F | Hats | 4 |
This makes it a lot easier to work with. See attached qvw.
You can make a bar chart with
- No Dimension
- An expression for each product column e.g. sum(Socks)
-Rob
Thanks very much to everybody for your responses.
With regards to Rob's method, is there a way of presenting the legend as labels on the horizontal axis instead (as if each category was a dimension)? The only way I can think of would be to remove the legend and manually place text boxes for each product.
Thanks
Just uncheck "Show Legend" on the Presentation tab and the Label values will display below the bars.
-Rob