Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I need to create a stacked bar chart from the information available in two tables (Sales and target remaining). Stacked bar chart should be like below, x axis is sales month with sum(sales) in the y axis and stacked with target remaining which is available in remaining target table. linking key is ID column.
Sales:
ID | Sales | Sale month |
1 | 200 | Jan |
1 | 150 | Feb |
2 | 300 | Feb |
3 | 75 | Jan |
3 | 50 | Feb |
3 | 25 | March |
Remaining Target:
ID | Target remaining | Target month |
1 | 150 | Jan |
2 | 100 | Jan |
3 | 200 | March |
Stacker Bar chart:
First concatenate the two tables into one table:
Data:
LOAD ID, Sales, [Sales month] as Month FROM ...sales source table...;
Concatenate (Data)
LOAD ID, [Target remaining], [Target month] as Month FROM ...target source table...;
Reload the document and create a bar chart with Month as dimension and sum(Sales) and sum([Target remaining]) as expressions.
First concatenate the two tables into one table:
Data:
LOAD ID, Sales, [Sales month] as Month FROM ...sales source table...;
Concatenate (Data)
LOAD ID, [Target remaining], [Target month] as Month FROM ...target source table...;
Reload the document and create a bar chart with Month as dimension and sum(Sales) and sum([Target remaining]) as expressions.
Thanks Gysbert. It worked. I thought it'll create duplicates, but nice solution.