Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

aboumejjane
Contributor

creating 100% grouped bar per country

Hi guys,

I have a bar chart that give the percentage of shipments that are ontime or late per country.

the bar chart calculates the percentage of ontime/late based on all the countrycodes in the bar chart. Only when I click on a certain country e.g. 'AE' I see the the 'total percentage' of a specific country.

Is there a way to do this for all the country, without having to click on a certain country?

I have 2 dimensions:

CountryCode

Status

My expression is: count(shipmentid) / count(Total shipmentid)

Thanks in advance!

Isam

I've attached a screenshot with what I'm trying to achieve.

Regards,

iSam

1 Solution

Accepted Solutions
Not applicable

Re: creating 100% grouped bar per country

Hi iSam, you can use count(Order) / count(Total <Ctry> Order) to get the 100% bar per country

9 Replies
Sokkorn
Honored Contributor

creating 100% grouped bar per country

Hi iSam,

Can you attached a small application? So that it can easy to solve your issue.

Regards,

Sokkorn Cheav

aboumejjane
Contributor

Re: creating 100% grouped bar per country

Hi,

I've attached a sample of my qlikview document.

Regards,

Isam

Sokkorn
Honored Contributor

Re: creating 100% grouped bar per country

Hi ISam,

I will reply you back by tomorrow. Coz I need to go now.

Regards,

Sokkorn Cheav

aboumejjane
Contributor

Re: creating 100% grouped bar per country

Thanks looking forward for your reply J

Not applicable

Re: creating 100% grouped bar per country

Hi iSam, you can use count(Order) / count(Total <Ctry> Order) to get the 100% bar per country

aboumejjane
Contributor

Re: creating 100% grouped bar per country

Hi Sajeevan,

That indeed did the job! Thanks for your help!!

iSam

Not applicable

creating 100% grouped bar per country

Thanks, please mark the posting as answered

Sokkorn
Honored Contributor

Re: creating 100% grouped bar per country

Hi iSam,

Here is the second solution

Create <Bar Chart> with

1. Ctry as Dimentions

2. Two Expression

    . COUNT({$<Status = {'Late'}>} Order) / count(Order)          with Label <Late>

    . COUNT({$<Status = {'OnTime'}>} Order) / count(Order)     with Label <OnTime>

See the attached file also.

Regards,

Sokkorn Cheav

aboumejjane
Contributor

Re: creating 100% grouped bar per country

Hi Sokkorn,

Thanks for sharing your solution!!

Regards,

iSam

Community Browser