Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to show marketshare in bar chart

Hi guys

complete newbie to QV

I have prepared what is in the image below.

I want to be able to calculate the market share of each Salesman ID and show it on the chart.

I think the ideal chart type for this is combo chart.

Any ideas how I do this please?

I specifically need the expression and need to be told where to put it.

cheerz guys

I have a qv_screenshot.jpg

1 Solution

Accepted Solutions
Not applicable
Author

you can add the expression:

aggr(sum(sales),salesmanID)/sum(sales)

hope this expression will work.

try it out.

View solution in original post

9 Replies
Not applicable
Author

you can take another expression of market share in this bar chart which shows market share of each salesman.

but if you want to show market share then this can better describe through pie chart.

but if you want to show in this graph only then simply add the expression for market share.

this expression you have to decide as i don't know your database.

Not applicable
Author

thank for the reply.

I have learned how to do the marketshare in a pie chart.

All I want to do is simply devide the total of each individual by everyones total.

Where sum(sales) for salesman_ID 2002 is 178389 (as shown in image), and the whole sales total is 2317233

I want to do this  =178389/2317233

and show it as percentage in the chart as a line graph.

hope I'm clear

Not applicable
Author

Hi rizo,

You can add another expression in your combo chart:

sum(sales)/sum(TOTAL (sales)).

After that you can chose how you want to display the expression. Chose "Line" and if you want to see the Values chose "Values on Data Points". To see this Values as percentage, go to the Number tab and chose "Show in Percent".

Regards

David

Not applicable
Author

I tried that except i didnt put TOTAL (sales) in brackets.

I will try this tonight and horefully it'll work.

thanks for the the help

Not applicable
Author

you can add the expression:

aggr(sum(sales),salesmanID)/sum(sales)

hope this expression will work.

try it out.

Not applicable
Author

will try em and ley you guys know

Not applicable
Author

just some feedback guys.

they didnt work because i had 2 dimensions set.

but thet did work when i removed one.

so both expressions are correct.

thanks for the help guys

Not applicable
Author

Rizo98

Make sure you have the Combo chart type selected and set one expression to be a bar and the other to be a line. When you then look at the AXIS tab you can set each dimension to have a seperate axis which should then allow you to have both expressions on the same chart

Ta

Lewis

Not applicable
Author

i did just that.

thanks