1

I am trying to create a stacked bar chart on Qlik from a dataset shown below. The chart should look like a picture below. (I apologize about the quality). I watched a couple of tutorials, but their dataset had a different organization... Should I also revise my dataset to create this stacked bar chart? Please let me know if you have any questions. Thank you so much for taking your time.

dataset

stacked bar chart image

Tak
  • 167
  • 1
  • 5
  • 18

1 Answers1

1

This is crosstable which is rather not compatible with most BI tools. So in QlikView first thing we need to do is in load script generate model which will have variables Priority (for example "saving job") and Score (for example "top priority").

# I assume that your table is named data
data_fixed:
CrossTable(priority, score)
LOAD 
*
Resident
    data;

#we drop data table because we no longer need it
DROP Table data;

We can aggregate data in load script to count volumes so it will work faster

data_aggregated:
LOAD
    priority,
    score,
    Count(score) as #Num
Resident
    data_fixed
Group By
    priority,
    score;

#we drop data_fixed table because we no longer need it
DROP Table data_fixed;

In qlikview you need to add 2 dimensions: qlikview dimension

1 expression:

qlikview expression

and set as stacked bar chart:

qlikview stack bar

and our chart is ready (here) with example data:

qlikview stacked bar chart

in QliKSense load script will be the same. Setting a bar chart will look different but we need to set the same things.

Hubert Dudek
  • 1,666
  • 1
  • 13
  • 21