Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkumargowda
Creator
Creator

Stacked bar chart from 2 tables

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:  

IDSalesSale month
1200Jan
1150Feb
2300Feb
375Jan
350Feb
325

March

Remaining Target:

   

IDTarget remainingTarget month
1150Jan
2100Jan
3200

March

Stacker Bar chart:

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

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.


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

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.


talk is cheap, supply exceeds demand
manojkumargowda
Creator
Creator
Author

Thanks Gysbert. It worked. I thought it'll create duplicates, but nice solution.