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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
gayatri7
Creator II
Creator II

Stacked Bar chart with 2 dimensions and 2 Expressions

Hi All,

I have created a below stacked bar chart with help of 2 dimensions and 1 expression and it is as expected. I want to add another expression in order to compare both the details side by side

1st Expression : Sum (Policy Required)

Stacked bar chart1.PNG

I want to add another expression in order to compare both the details side by side

2nd Expression : Sum(Policy Collected)


When I am adding the 2nd expression chart is getting changed as below.


Stacked Chart 2.PNG


How do I create two bars with 2 expressions and internally it should get divided with file type based on month.


Attached is the sample qvw and data.

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

8 Replies
effinty2112
Master
Master

Hi Gayatri,

                    Is this what you're looking for?:

1.jpg

One dimension: Month

Eight expressions:

Sum({$<[File Type] = {'C01'}>}[Policy Required])

Sum({$<[File Type] = {'C02'}>}[Policy Required])

Sum({$<[File Type] = {'C03'}>}[Policy Required])

Sum({$<[File Type] = {'C04'}>}[Policy Required])

Sum({$<[File Type] = {'C01'}>}[Policy Collected])

Sum({$<[File Type] = {'C02'}>}[Policy Collected])

Sum({$<[File Type] = {'C03'}>}[Policy Collected])

Sum({$<[File Type] = {'C04'}>}[Policy Collected])

qliksus
Specialist II
Specialist II

Trellis can be used for your requirement

gayatri7
Creator II
Creator II
Author

Hi Andrew,

Thanks for your time. But I have tried that using C01, C02 etc in expression directly. But it is not fulfilling my requirement as I want to compare the Sum of Policy Required and Policy Collected based on month and File type.

In the above chart it is bit difficult to compare the both. I want something like below. two different bars for expression

Capture.PNG

and that bar should get divided into file type.

gayatri7
Creator II
Creator II
Author

Thanks for your time Susant. I will try that option. But I want my chart to look like below.

Capture.PNG

antoniotiman
Master III
Master III

See Attachment.

effinty2112
Master
Master

Hi Gayatri,

What about:

2.jpg

Data:

CrossTable  (Policy, Amount, 2)

LOAD Month,

     [File Type],

     [Policy Required],

     [Policy Collected]

FROM

[Sample Data.xlsx]

(ooxml, embedded labels, table is Sheet1);

Left Join

LOAD

Distinct

Month & ' ' & Policy as MthPolicy,

* Resident Data;

Chart dimensions are MthPolicy and [File Type]

Cheers

Andrew

gayatri7
Creator II
Creator II
Author

It looks exactly what I want. Let me try this. Thanks

gayatri7
Creator II
Creator II
Author

Hi Antonia,

Thanks for the reply. Its perfect..