Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
D19PAL
Creator II
Creator II

Stacked bars, create table or can I use set analysis

Hi,

I've got a sales table and a targets table joined with id

 

SALES
IDSALES
110
2 
350

 

left join

TARGETS
IDTargets
1 
229
330

 

My table in Qlik

FACT TABLE
idsalestargets
110 
2 29
35030

 

What I need is to create a stacked bar chart, shall i create the table below? if so how, or can I use 2 measures as two aggregated fields as a stacked bar chart, or will i need to create the table below?

 

Need
idsales or targetfigures
1sales10
2sales 
3sales50
1target 
2target29
3target30

 

Thanks 

1 Reply
joseph_morales
Creator II
Creator II

Hi @D19PAL 

You don't need to create the last table, you can create the stacked bar chart with the table resulting from the join.

The result of the join:

joseph_morales_0-1612795649827.png

Create a bar chart, I assume the dimension is ID, and as expressions SUM (SALES) and SUM (Targets)

joseph_morales_1-1612795717976.png

In the styles tab, you choose the type of stacked bar.

joseph_morales_2-1612795825885.png

Regards,

 

Best Regards,
Joseph Morales