Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Bar chart + multi Line chart

Hi all,

I'm trying to do a specific chart :

2 Dim :

- CATEGORY

- MONTH

2 Expr:

- Volume

- Market Share of category per month

I want :

- bar chart for the volume (one bar per category per month)

- line chart for MS (one line per category)

I'm using the Combo chart to do it but I have an issue : The line chart doesn't split per CATEGORY, I only have one line for all category.

I attached one qvw with 2 sheets :

- First with the example that I can't do

- Second the result I'm almost trying to get (for this sheet I did one expression per category, of course I'm looking for something dynamic)

Anyone has an idea ?

Thanks,

C.

1 Solution

Accepted Solutions
hdonald
Creator
Creator

Hi,

If you have to make many expressions in a dynamic way you could use something like the macro code in one of the example Qlikview docs - 'Dynamic Chart' - here..http://community.qlik.com/qlikviews/1077

See the attached basic example that just adds 1 expression per CAT to your chart.

Looking at the the result though, it seems Stefan's suggestion to review the requirement is the best answer as it looks like 2 separate charts..which would be easier,

Regards,

HD

View solution in original post

10 Replies
Not applicable
Author

Hi

I see just one solution.

Create  5 expression  1 bar & 4 lines

Bar  =   sum(VOLUME)

Line 1 = sum({<CAT={'A'}>} VOLUME)/sum(total<MONTH> VOLUME)

Line 2 = sum({<CAT={'B'}>} VOLUME)/sum(total<MONTH> VOLUME)

etc...

I'm not sure it's what you want but it works

JJ

Not applicable
Author

It's what I did on the second sheet on the attached .qvw to show the needs.

This solution works but is not acceptable because it has to be dynamic. There is lot of CAT in the system.

It seems like a bug, more than something else ... Because if I drop the expression in bar I get the lines I wanted ...

Not applicable
Author

Grid charts are often used to show the relationships in size, It would be best if you use Grid Chart.

Not applicable
Author

Can you give a real example ? Im trying to show a chart and not a list.

Not applicable
Author

you can change your chart type to Grid chart..however you can also peep into Sample apps on start up page..

have fun.

Not applicable
Author

Thank you for your help,

It tried it but the result isn't what my client want. This chart is not demonstrativ enought for these indicator

swuehl
MVP
MVP

Hi Cyrille,

you said it looks like a bug and that's what comes to mind to many of us, but I think it is by design.

QV seems not to handle well line charts with more than one dimension, if you use more than one, you will get a line chart sampling point only at the first dimensions value on the x-axis. You might get around this if you use one dimension only, built from MONTH & CAT (maybe using an advanced aggregation to have the underlying dimensions still at hand).

With your requirements, I have (at least) one question:

You want to use two dimensions, CAT and MONTH and you want a bar for each CAT and MONTH.

This means your x-axis should span over both dimensions.

Then you want line chart, with a line per CAT. This sounds to me that here you want to use the second dim to generate a bundle of expression like output, i.e. your second dimension CAT should not be used for the x-axis, right? Not sure if I make myself clear, but for me that's kind of contradicting design requirement. So maybe you could clarify this to me.

Regards,

Stefan

hdonald
Creator
Creator

Hi,

If you have to make many expressions in a dynamic way you could use something like the macro code in one of the example Qlikview docs - 'Dynamic Chart' - here..http://community.qlik.com/qlikviews/1077

See the attached basic example that just adds 1 expression per CAT to your chart.

Looking at the the result though, it seems Stefan's suggestion to review the requirement is the best answer as it looks like 2 separate charts..which would be easier,

Regards,

HD

Not applicable
Author

Finaly the solution with one expr per CAT is the best.

Even better when it's dynamic...

I have also a solution really dirty but it works : superposition

2 chars : one in bar the other in line and the one over the other with transparent background.

Thank you all for your help.

C.