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

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create Bar chart

Hi,

I need help in creating a bar chart as under

The Db table 'X' the chart is pointing to has following columns:

1) Column 'Cycles' that has values Cycle 1, Cycle 2 etc (it can go upto Cycle 'n')

2) Columns 'P', 'F', 'B'.

On the chart,

X axis to have cycles as separate bars based on the max value in Cycles column

Each cycle bar will have count of 'P', 'F', and 'B'.

What should be the expressions and dimensions for the chart?

Thanks in advance.

1 Solution

Accepted Solutions
swuehl
Champion III
Champion III

Try one dimension, Cycles and three expressions:

=Count(P)

=Count(F)

=Count(B)

and set style to stacked in bar properties.

Or use a CROSSTABLE LOAD prefix in your script:

CROSSTABLE (Column, Value)

LOAD Cycles, P,F,B

FROM ...;

Then use dimensions Cycles and Column and as expression

=Count(Value)

View solution in original post

2 Replies
swuehl
Champion III
Champion III

Try one dimension, Cycles and three expressions:

=Count(P)

=Count(F)

=Count(B)

and set style to stacked in bar properties.

Or use a CROSSTABLE LOAD prefix in your script:

CROSSTABLE (Column, Value)

LOAD Cycles, P,F,B

FROM ...;

Then use dimensions Cycles and Column and as expression

=Count(Value)

Not applicable
Author

Thanks a ton, Swuehl. The first option worked.