Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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.

Tags (1)
1 Solution

Accepted Solutions
hdonald
Contributor

Re: Bar chart + multi Line chart

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

10 Replies
Not applicable

Bar chart + multi Line chart

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

Bar chart + multi Line chart

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

Bar chart + multi Line chart

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

Not applicable

Bar chart + multi Line chart

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

Not applicable

Bar chart + multi Line chart

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

Bar chart + multi Line chart

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

MVP
MVP

Bar chart + multi Line chart

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
Contributor

Re: Bar chart + multi Line chart

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

Bar chart + multi Line chart

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.

Community Browser